From 2389395bf3183a2ef9bb6ef3a7c7fbf15475f0a1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:56: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/astral-sh/ruff-pre-commit: v0.14.6 → v0.14.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.6...v0.14.7) - [github.com/rbubley/mirrors-prettier: v3.6.2 → v3.7.3](https://github.com/rbubley/mirrors-prettier/compare/v3.6.2...v3.7.3) --- .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 dacf3fa50..f2f038160 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: hooks: - id: validate-pyproject - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.14.6" + rev: "v0.14.7" hooks: - id: ruff-check args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"] @@ -38,7 +38,7 @@ repos: hooks: - id: rst-backticks - repo: https://github.com/rbubley/mirrors-prettier - rev: "v3.6.2" + rev: "v3.7.3" hooks: - id: prettier - repo: local From 2f506e6d677c9bc38daeeb58003250d36150cfa0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:57:00 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/tox/plugin/manager.py | 4 ++-- src/tox/session/env_select.py | 4 ++-- tests/plugin/test_plugin.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tox/plugin/manager.py b/src/tox/plugin/manager.py index 323d5ae41..b7c902a7b 100644 --- a/src/tox/plugin/manager.py +++ b/src/tox/plugin/manager.py @@ -112,8 +112,8 @@ def tox_env_teardown(self, tox_env: ToxEnv) -> None: self.manager.hook.tox_env_teardown(tox_env=tox_env) def load_plugins(self, path: Path) -> None: - for _plugin in self.manager.get_plugins(): # make sure we start with a clean state, repeated in memory run - self.manager.unregister(_plugin) + for plugin in self.manager.get_plugins(): # make sure we start with a clean state, repeated in memory run + self.manager.unregister(plugin) inline = _load_inline(path) self._register_plugins(inline) REGISTER._register_tox_env_types(self) # noqa: SLF001 diff --git a/src/tox/session/env_select.py b/src/tox/session/env_select.py index 91c971524..be7979daa 100644 --- a/src/tox/session/env_select.py +++ b/src/tox/session/env_select.py @@ -283,8 +283,8 @@ def _defined_envs(self) -> dict[str, _ToxEnvInfo]: # noqa: C901, PLR0912 other_env_info = self._defined_envs_.get(env.name) if other_env_info is not None and isinstance(other_env_info.env, RunToxEnv): del self._defined_envs_[env.name] # pragma: no cover - for _pkg_env in other_env_info.env.package_envs: # pragma: no cover - self._pkg_env_counter[_pkg_env.name] -= 1 # pragma: no cover + for pkg_env in other_env_info.env.package_envs: # pragma: no cover + self._pkg_env_counter[pkg_env.name] -= 1 # pragma: no cover except Exception: # noqa: BLE001 assert self._defined_envs_[name].package_skip is not None # noqa: S101 failed_to_create = failed.keys() - self._defined_envs_.keys() diff --git a/tests/plugin/test_plugin.py b/tests/plugin/test_plugin.py index 2ccc25e33..1e083a758 100644 --- a/tests/plugin/test_plugin.py +++ b/tests/plugin/test_plugin.py @@ -245,12 +245,12 @@ def tox_add_env_config(env_conf: EnvConfigSet, state: State) -> None: # noqa: A def test_plugin_config_frozen_past_add_env(tox_project: ToxProjectCreator, mocker: MockerFixture) -> None: def _cannot_extend_config(config_set: ConfigSet) -> None: - for _conf in ( + for conf in ( lambda c: c.add_constant("c", "desc", "v"), lambda c: c.add_config("c", of_type=str, default="c", desc="d"), ): try: - _conf(config_set) # type: ignore[no-untyped-call] # call to not typed function + conf(config_set) # type: ignore[no-untyped-call] # call to not typed function raise NotImplementedError except RuntimeError as exc: # noqa: PERF203 assert str(exc) == "config set has been marked final and cannot be extended" # noqa: PT017