diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 99300c9..2218bed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ repos: - - repo: https://github.com/psf/black - rev: 20.8b1 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.1.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: "3.8.4" + rev: "7.3.0" hooks: - id: flake8 - repo: https://github.com/asottile/pyupgrade - rev: v2.7.4 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py36-plus] diff --git a/reg/tests/test_docgen.py b/reg/tests/test_docgen.py index 1c53460..48534c0 100644 --- a/reg/tests/test_docgen.py +++ b/reg/tests/test_docgen.py @@ -11,9 +11,7 @@ def rstrip_lines(s): def test_dispatch_method_class_help(capsys): pydoc.help(Foo) out, err = capsys.readouterr() - assert ( - rstrip_lines(out) - == """\ + assert rstrip_lines(out) == """\ Help on class Foo in module reg.tests.fixtures.module: class Foo({builtins}.object) @@ -35,38 +33,29 @@ class Foo({builtins}.object) | | __weakref__ | list of weak references to the object (if defined) -""".format( - builtins=object.__module__ - ) - ) +""".format(builtins=object.__module__) def test_dispatch_method_help(capsys): pydoc.help(Foo.bar) out, err = capsys.readouterr() - assert ( - rstrip_lines(out) - == """\ + assert rstrip_lines(out) == """\ Help on function bar in module reg.tests.fixtures.module: bar(self, obj) Return the bar of an object. """ - ) def test_dispatch_help(capsys): pydoc.help(foo) out, err = capsys.readouterr() - assert ( - rstrip_lines(out) - == """\ + assert rstrip_lines(out) == """\ Help on function foo in module reg.tests.fixtures.module: foo(obj) return the foo of an object. """ - ) def test_autodoc(tmpdir): @@ -80,9 +69,7 @@ def test_autodoc(tmpdir): # remove it. app = Sphinx(root, root, root + "/build", root, "text", status=None) app.build() - assert ( - tmpdir.join("build/contents.txt").read() - == """\ + assert tmpdir.join("build/contents.txt").read() == """\ Sample module for testing autodoc. class reg.tests.fixtures.module.Foo @@ -101,4 +88,3 @@ class reg.tests.fixtures.module.Foo return the foo of an object. """ - )