From 48b8d2813718ba9461609b4f4ed1cd4d5edb98da 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 18:31:07 +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: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.15.20](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.4...v0.15.20) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 25.1.0 → 26.5.1](https://github.com/psf/black-pre-commit-mirror/compare/25.1.0...26.5.1) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v2.1.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.15.0...v2.1.0) - [github.com/codespell-project/codespell: v2.4.1 → v2.4.2](https://github.com/codespell-project/codespell/compare/v2.4.1...v2.4.2) --- .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 3a713d4..b6e75c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v5.0.0" + rev: "v6.0.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -13,26 +13,26 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.11.4" + rev: "v0.15.20" hooks: - id: ruff args: [--fix] - - repo: https://github.com/psf/black - rev: "25.1.0" + - repo: https://github.com/psf/black-pre-commit-mirror + rev: "26.5.1" hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.15.0" + rev: "v2.1.0" hooks: - id: mypy exclude: examples - repo: https://github.com/codespell-project/codespell - rev: "v2.4.1" + rev: "v2.4.2" hooks: - id: codespell From 6e1b0a57f5536d13e55ff1df0454bc7b9d594fc4 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 18:33:23 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyodide_pack/tests/test_ast_rewrite.py | 45 ++++++-------------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/pyodide_pack/tests/test_ast_rewrite.py b/pyodide_pack/tests/test_ast_rewrite.py index a036be8..37507f4 100644 --- a/pyodide_pack/tests/test_ast_rewrite.py +++ b/pyodide_pack/tests/test_ast_rewrite.py @@ -20,14 +20,9 @@ def foo(): ''' tree = ast.parse(dedent(src_code)) tree = _StripDocstringsTransformer().visit(tree) - assert ( - ast.unparse(tree) - == dedent( - """ + assert ast.unparse(tree) == dedent(""" def foo(): - return 1""" - ).strip("\n") - ) + return 1""").strip("\n") def test_strip_docstrings_nested_functions(): @@ -41,18 +36,13 @@ def bar(): ''' tree = ast.parse(dedent(src_code)) tree = _StripDocstringsTransformer().visit(tree) - assert ( - ast.unparse(tree) - == dedent( - """ + assert ast.unparse(tree) == dedent(""" def foo(): def bar(): return 2 return bar - """ - ).strip("\n") - ) + """).strip("\n") def test_strip_docstrings_class(): @@ -72,10 +62,7 @@ def bar(self): ''' tree = ast.parse(dedent(src_code)) tree = _StripDocstringsTransformer().visit(tree) - assert ( - ast.unparse(tree) - == dedent( - """ + assert ast.unparse(tree) == dedent(""" class A: def foo(self): @@ -83,9 +70,7 @@ def foo(self): def bar(self): return 1 - """ - ).strip("\n") - ) + """).strip("\n") def test_strip_docstrings_empty_function(): @@ -95,15 +80,10 @@ def foo(): ''' tree = ast.parse(dedent(src_code)) tree = _StripDocstringsTransformer().visit(tree) - assert ( - ast.unparse(tree) - == dedent( - """ + assert ast.unparse(tree) == dedent(""" def foo(): pass - """ - ).strip("\n") - ) + """).strip("\n") def test_strip_module_docstrings(): @@ -113,14 +93,9 @@ def test_strip_module_docstrings(): ''' tree = ast.parse(dedent(src_code)) tree = _strip_module_docstring(tree) - assert ( - ast.unparse(tree) - == dedent( - """ + assert ast.unparse(tree) == dedent(""" a = 1 - """ - ).strip("\n") - ) + """).strip("\n") @settings(deadline=300)