From 640e0710a51fd293340a8d4862381aeb746fb26c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Oct 2022 18:54:50 -0400 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#239) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0) - [github.com/pre-commit/mirrors-mypy: v0.981 → v0.982](https://github.com/pre-commit/mirrors-mypy/compare/v0.981...v0.982) - [github.com/asottile/pyupgrade: v2.38.2 → v3.0.0](https://github.com/asottile/pyupgrade/compare/v2.38.2...v3.0.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- docs/conf.py | 1 - tests/test_multimethod.py | 14 +++++++------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f5d80f..b7c11c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/psf/black - rev: 22.8.0 + rev: 22.10.0 hooks: - id: black language_version: python3 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.981 + rev: v0.982 hooks: - id: mypy - repo: https://github.com/PyCQA/flake8 @@ -28,6 +28,6 @@ repos: - id: docformatter args: [--in-place] - repo: https://github.com/asottile/pyupgrade - rev: v2.38.2 + rev: v3.0.0 hooks: - id: pyupgrade diff --git a/docs/conf.py b/docs/conf.py index b372d7f..f9ea754 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # generic documentation build configuration file, created by # sphinx-quickstart on Sat Dec 3 16:59:36 2011. diff --git a/tests/test_multimethod.py b/tests/test_multimethod.py index 23ef2fd..7e1cb2f 100644 --- a/tests/test_multimethod.py +++ b/tests/test_multimethod.py @@ -5,7 +5,7 @@ from generic.multimethod import has_multimethods, multimethod def test_multimethod(): @has_multimethods - class Dummy(object): + class Dummy: @multimethod(int) def foo(self, x): return x + 1 @@ -22,7 +22,7 @@ def test_multimethod(): def test_multimethod_with_two_arguments(): @has_multimethods - class Dummy(object): + class Dummy: @multimethod(int, int) def foo(self, x, y): return x * y @@ -39,7 +39,7 @@ def test_multimethod_with_two_arguments(): def test_multimethod_otherwise_clause(): @has_multimethods - class Dummy(object): + class Dummy: @multimethod(int) def foo(self, x): return x + 1 @@ -55,7 +55,7 @@ def test_multimethod_otherwise_clause(): def test_multimethod_otherwise_clausewith_two_arguments(): @has_multimethods - class Dummy(object): + class Dummy: @multimethod(int, int) def foo(self, x, y): return x * y @@ -70,7 +70,7 @@ def test_multimethod_otherwise_clausewith_two_arguments(): def test_inheritance(): @has_multimethods - class Dummy(object): + class Dummy: @multimethod(int) def foo(self, x): return x + 1 @@ -111,7 +111,7 @@ def test_override_in_same_class_not_allowed(): with pytest.raises(ValueError): @has_multimethods - class Dummy(object): + class Dummy: @multimethod(str, str) def foo(self, x, y): return x + y @@ -123,7 +123,7 @@ def test_override_in_same_class_not_allowed(): def test_inheritance_override(): @has_multimethods - class Dummy(object): + class Dummy: @multimethod(int) def foo(self, x): return x + 1