From 7f8fce13fe99599bf246b695f66ca6d2d1ad7ec0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:23:11 +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: - [github.com/pre-commit/pre-commit-hooks: v3.4.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v3.4.0...v6.0.0) - [github.com/domdfcoding/pre-commit-hooks: v0.6.0 → v0.7.0](https://github.com/domdfcoding/pre-commit-hooks/compare/v0.6.0...v0.7.0) - [github.com/python-formate/pyupgrade: bbe3007 → v3.3.0](https://github.com/python-formate/pyupgrade/compare/bbe3007...v3.3.0) - [github.com/Lucas-C/pre-commit-hooks: v1.5.1 → v1.5.6](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.5.1...v1.5.6) - [github.com/python-formate/snippet-fmt: v0.1.5 → v0.2.0](https://github.com/python-formate/snippet-fmt/compare/v0.1.5...v0.2.0) - [github.com/python-formate/formate: v1.2.0 → v1.2.1](https://github.com/python-formate/formate/compare/v1.2.0...v1.2.1) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7892ced..b513d80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: reformat-pyproject - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -32,7 +32,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks - rev: v0.6.0 + rev: v0.7.0 hooks: - id: requirements-txt-sorter args: @@ -60,7 +60,7 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/python-formate/pyupgrade - rev: bbe3007 + rev: v3.3.0 hooks: - id: pyupgrade args: @@ -68,18 +68,18 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.1 + rev: v1.5.6 hooks: - id: remove-crlf - id: forbid-crlf - repo: https://github.com/python-formate/snippet-fmt - rev: v0.1.5 + rev: v0.2.0 hooks: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v1.2.0 + rev: v1.2.1 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ From 8bef77d3363a153b180862de84fc963de7463e8c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:36:49 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pprint36/_pprint.py | 24 ++++++++++++++---------- tests/_test_set.py | 15 ++++++++++----- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/pprint36/_pprint.py b/pprint36/_pprint.py index 02e607b..849a15a 100644 --- a/pprint36/_pprint.py +++ b/pprint36/_pprint.py @@ -44,7 +44,8 @@ def pprint(object, stream=None, indent=1, width=80, depth=None, *, compact=False, sort_dicts=True): - """Pretty-print a Python object to a stream [default is sys.stdout].""" + """Pretty-print a Python object to a stream [default is sys.stdout]. +""" printer = PrettyPrinter( stream=stream, indent=indent, @@ -57,7 +58,8 @@ def pprint(object, stream=None, indent=1, width=80, depth=None, *, compact=False def pformat(object, indent=1, width=80, depth=None, *, compact=False, sort_dicts=True): - """Format a Python object into a pretty-printed representation.""" + """Format a Python object into a pretty-printed representation. +""" return PrettyPrinter( indent=indent, width=width, @@ -68,22 +70,26 @@ def pformat(object, indent=1, width=80, depth=None, *, compact=False, sort_dicts def pp(object, *args, sort_dicts=False, **kwargs): - """Pretty-print a Python object""" + """Pretty-print a Python object +""" pprint(object, *args, sort_dicts=sort_dicts, **kwargs) def saferepr(object): - """Version of repr() which can handle recursive data structures.""" + """Version of repr() which can handle recursive data structures. +""" return _safe_repr(object, {}, None, 0, True)[0] def isreadable(object): - """Determine if saferepr(object) is readable by eval().""" + """Determine if saferepr(object) is readable by eval(). +""" return _safe_repr(object, {}, None, 0, True)[1] def isrecursive(object): - """Determine if object requires a recursive representation.""" + """Determine if object requires a recursive representation. +""" return _safe_repr(object, {}, None, 0, True)[2] @@ -94,8 +100,7 @@ class _safe_key: unorderable types (sorting first comparing the type name and then by the obj ids). Does not work recursively, so dict.items() must have _safe_key applied to both the key and the value. - - """ +""" __slots__ = ["obj"] @@ -138,8 +143,7 @@ def __init__(self, indent=1, width=80, depth=None, stream=None, *, compact=False sort_dicts If true, dict keys are sorted. - - """ +""" indent = int(indent) width = int(width) if indent < 0: diff --git a/tests/_test_set.py b/tests/_test_set.py index 4a0d1a4..b8cca24 100644 --- a/tests/_test_set.py +++ b/tests/_test_set.py @@ -1099,7 +1099,8 @@ def gooditer(): class TestExceptionPropagation(unittest.TestCase): - """SF 628246: Set constructor should not trap iterator TypeErrors""" + """SF 628246: Set constructor should not trap iterator TypeErrors +""" def test_instanceWithException(self): self.assertRaises(TypeError, set, baditer()) @@ -1990,7 +1991,8 @@ def __eq__(self, o): class TestOperationsMutating: - """Regression test for bpo-46615""" + """Regression test for bpo-46615 +""" constructor1 = None constructor2 = None @@ -2202,7 +2204,8 @@ class TestMethodsMutating_Set_List(TestMethodsMutating, unittest.TestCase): def powerset(U): - """Generates all subsets of a set or sequence U.""" + """Generates all subsets of a set or sequence U. +""" U = iter(U) try: x = frozenset([next(U)]) @@ -2214,7 +2217,8 @@ def powerset(U): def cube(n): - """Graph of n-dimensional hypercube.""" + """Graph of n-dimensional hypercube. +""" singletons = [frozenset([x]) for x in range(n)] return {x: frozenset([x ^ s for s in singletons]) for x in powerset(range(n))} @@ -2222,7 +2226,8 @@ def cube(n): def linegraph(G): """Graph, the vertices of which are edges of G, with two vertices being adjacent iff the corresponding - edges share a vertex.""" + edges share a vertex. +""" L = {} for x in G: for y in G[x]: