Skip to content

Commit

Permalink
Revert previous "precommit autoupdate (tox-dev#3214)" commit; it's br…
Browse files Browse the repository at this point in the history
…oken

The top-level linter setting names in pyproject.toml have changed, and
while this _could_ accept the old names until they're fixed, it choses not
to and fails the build.

Fixing that is easy, but results in yet more failures that were not
previously appearing in unchanged code.

- Revert "[pre-commit.ci] pre-commit autoupdate (tox-dev#3214)"
- This reverts commit 3347933.
  • Loading branch information
0cjs committed Feb 6, 2024
1 parent 3347933 commit 18033cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.0
rev: v0.1.14
hooks:
- id: ruff-format
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion src/tox/session/env_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = dict.fromkeys(env.split("-"))
factors: dict[str, str | None] = {k: None for k in env.split("-")}
found_factors: set[str] = set()
for factor in factors:
if (
Expand Down
2 changes: 1 addition & 1 deletion src/tox/tox_env/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(dict.fromkeys(values).keys())
result = sorted({k: None for k in 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:
Expand Down

0 comments on commit 18033cf

Please sign in to comment.