From 21416b06948b4989cc46e5b272264726306a7c53 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 21:22:03 +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/astral-sh/ruff-pre-commit: v0.15.20 → v0.15.22](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.20...v0.15.22) - [github.com/woodruffw/zizmor-pre-commit: v1.26.1 → v1.27.0](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.26.1...v1.27.0) - [github.com/codespell-project/codespell: v2.4.2 → v2.4.3](https://github.com/codespell-project/codespell/compare/v2.4.2...v2.4.3) - [github.com/pre-commit/mirrors-mypy: v2.1.0 → v2.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v2.1.0...v2.3.0) --- .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 2d1003d0bbe..1f3e8f3bd53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ minimum_pre_commit_version: "4.4.0" repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.15.20" + rev: "v0.15.22" hooks: - id: ruff-check args: ["--fix"] @@ -13,7 +13,7 @@ repos: - id: end-of-file-fixer - id: check-yaml - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.26.1 + rev: v1.27.0 hooks: - id: zizmor args: ["--fix", "--no-progress"] @@ -23,7 +23,7 @@ repos: - id: blacken-docs additional_dependencies: [black==24.1.1] - repo: https://github.com/codespell-project/codespell - rev: v2.4.2 + rev: v2.4.3 hooks: - id: codespell args: ["--toml=pyproject.toml"] @@ -34,7 +34,7 @@ repos: hooks: - id: python-use-type-annotations - repo: https://github.com/pre-commit/mirrors-mypy - rev: v2.1.0 + rev: v2.3.0 hooks: - id: mypy files: ^(src/|testing/|scripts/) From bd2e53ed1721c51d6e91ca814eb34831bf62cad4 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Tue, 14 Jul 2026 09:39:29 +0200 Subject: [PATCH 2/2] fix: satisfy mypy 2.3.0 [deprecated] and [unreachable] checks - tox_run.py: os.system is soft-deprecated, use subprocess.call - test_monkeypatch.py: inspect.isclass is now typed as TypeIs[type], narrowing makes the post-context assert look unreachable --- testing/freeze/tox_run.py | 3 ++- testing/test_monkeypatch.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/freeze/tox_run.py b/testing/freeze/tox_run.py index 38c1e75cf10..8d588dda56c 100644 --- a/testing/freeze/tox_run.py +++ b/testing/freeze/tox_run.py @@ -8,9 +8,10 @@ if __name__ == "__main__": import os + import subprocess import sys executable = os.path.join(os.getcwd(), "dist", "runtests_script", "runtests_script") if sys.platform.startswith("win"): executable += ".exe" - sys.exit(os.system(f"{executable} tests")) + sys.exit(subprocess.call([executable, "tests"])) diff --git a/testing/test_monkeypatch.py b/testing/test_monkeypatch.py index f00654d913d..04b16a1e8c2 100644 --- a/testing/test_monkeypatch.py +++ b/testing/test_monkeypatch.py @@ -436,7 +436,7 @@ def test_context() -> None: with monkeypatch.context() as m: m.setattr(functools, "partial", 3) assert not inspect.isclass(functools.partial) - assert inspect.isclass(functools.partial) + assert inspect.isclass(functools.partial) # type: ignore[unreachable] def test_context_classmethod() -> None: