From d2262318f3d585810c9569dc747856dfd3dcfb86 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:49:55 +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.1.14 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.14...v0.2.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6a822bfed..b6f08e58e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - id: blacken-docs additional_dependencies: [black==23.12.1] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.14 + rev: v0.2.0 hooks: - id: ruff-format - id: ruff From 70be3ce760e17ea02900c4659790fe3224636e97 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:50:26 +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/session/env_select.py | 2 +- src/tox/tox_env/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tox/session/env_select.py b/src/tox/session/env_select.py index a654eaa49..d332795c4 100644 --- a/src/tox/session/env_select.py +++ b/src/tox/session/env_select.py @@ -189,7 +189,7 @@ def _ensure_envs_valid(self) -> None: for env in self._cli_envs or []: if env.startswith(".pkg_external"): # external package continue - factors: dict[str, str | None] = {k: None for k in env.split("-")} + factors: dict[str, str | None] = dict.fromkeys(env.split("-")) found_factors: set[str] = set() for factor in factors: if ( diff --git a/src/tox/tox_env/api.py b/src/tox/tox_env/api.py index 5b4bb7c30..1d17473e4 100644 --- a/src/tox/tox_env/api.py +++ b/src/tox/tox_env/api.py @@ -139,7 +139,7 @@ def register_config(self) -> None: def pass_env_post_process(values: list[str]) -> list[str]: values.extend(self._default_pass_env()) - result = sorted({k: None for k in values}.keys()) + result = sorted(dict.fromkeys(values).keys()) invalid_chars = set(string.whitespace) invalid = [v for v in result if any(c in invalid_chars for c in v)] if invalid: