From 76e5eef2559903c02c952dc561d40540701f53a3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 20:44:26 +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.14.1 → v0.14.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.1...v0.14.2) - [github.com/woodruffw/zizmor-pre-commit: v1.15.2 → v1.16.0](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.15.2...v1.16.0) - [github.com/RobertCraigie/pyright-python: v1.1.406 → v1.1.407](https://github.com/RobertCraigie/pyright-python/compare/v1.1.406...v1.1.407) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 838e1772f56..d22ea26bf3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.14.1" + rev: "v0.14.2" hooks: - id: ruff-check args: ["--fix"] @@ -12,7 +12,7 @@ repos: - id: end-of-file-fixer - id: check-yaml - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.15.2 + rev: v1.16.0 hooks: - id: zizmor - repo: https://github.com/adamchainz/blacken-docs @@ -48,7 +48,7 @@ repos: # on <3.11 - exceptiongroup>=1.0.0rc8 - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.406 + rev: v1.1.407 hooks: - id: pyright files: ^(src/|scripts/) From 2004bb6ddfbc94cfd917114d5ae9c6d9d7e740d8 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 27 Oct 2025 22:04:15 +0100 Subject: [PATCH 2/2] Upgrade to pylint 4.0.2 --- src/_pytest/timing.py | 1 + testing/python/approx.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_pytest/timing.py b/src/_pytest/timing.py index 221eeffc4fd..51c3db23f6f 100644 --- a/src/_pytest/timing.py +++ b/src/_pytest/timing.py @@ -84,6 +84,7 @@ def time(self) -> float: return self._current_time def patch(self, monkeypatch: MonkeyPatch) -> None: + # pylint: disable-next=import-self from _pytest import timing # noqa: PLW0406 monkeypatch.setattr(timing, "sleep", self.sleep) diff --git a/testing/python/approx.py b/testing/python/approx.py index dc10a954839..9032e6c0cb4 100644 --- a/testing/python/approx.py +++ b/testing/python/approx.py @@ -5,6 +5,8 @@ import decimal from decimal import Decimal from fractions import Fraction +from math import inf +from math import nan from math import sqrt import operator from operator import eq @@ -16,9 +18,6 @@ from pytest import approx -inf, nan = float("inf"), float("nan") - - @pytest.fixture def mocked_doctest_runner(monkeypatch): import doctest