From 0e203077478eab74d6f2053e4b100d3c4064bfce Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:10:48 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 20.8b1 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/20.8b1...26.1.0) - [github.com/PyCQA/flake8: 3.8.4 → 7.3.0](https://github.com/PyCQA/flake8/compare/3.8.4...7.3.0) - [github.com/asottile/pyupgrade: v2.7.4 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v2.7.4...v3.21.2) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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] From a0c2a7dfa8844cf657c6a5bad5effb5fec55ef41 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:12:02 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- reg/tests/test_docgen.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) 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. """ - )