From b0ec52b0c385aacce23fc9c2048381e07b1a75dc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 21:53: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.21](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.20...v0.15.21) - [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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2d1003d0bbe..17b39dfbd08 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.21" hooks: - id: ruff-check args: ["--fix"] @@ -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 85f8a7034329d9daef47405a1a3865d8c1b03540 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: