[pre-commit.ci] pre-commit autoupdate (#239)

* [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>
This commit is contained in:
pre-commit-ci[bot] 2022-10-10 18:54:50 -04:00 committed by GitHub
parent 19ebc192dc
commit 640e0710a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 11 deletions

View File

@ -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

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# generic documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 3 16:59:36 2011.

View File

@ -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