Skip to content

Commit fc5ea9f

Browse files
[pre-commit.ci] pre-commit autoupdate (#3427)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ab51e14 commit fc5ea9f

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ repos:
1515
- id: codespell
1616
additional_dependencies: ["tomli>=2.0.1"]
1717
- repo: https://github.com/tox-dev/pyproject-fmt
18-
rev: "2.4.3"
18+
rev: "v2.4.3"
1919
hooks:
2020
- id: pyproject-fmt
2121
- repo: https://github.com/abravalheri/validate-pyproject
22-
rev: "v0.21"
22+
rev: "v0.22"
2323
hooks:
2424
- id: validate-pyproject
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: "v0.7.0"
26+
rev: "v0.7.1"
2727
hooks:
2828
- id: ruff-format
2929
- id: ruff
3030
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
3131
- repo: https://github.com/asottile/blacken-docs
32-
rev: 1.19.0
32+
rev: 1.19.1
3333
hooks:
3434
- id: blacken-docs
3535
additional_dependencies: [black==24.8]

src/tox/config/cli/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def parse_args( # type: ignore[override] # avoid defining all overloads
7979
res, argv = self.parse_known_args(args, namespace)
8080
if argv:
8181
self.error(
82-
f'unrecognized arguments: {" ".join(argv)}\n'
82+
f"unrecognized arguments: {' '.join(argv)}\n"
8383
"hint: if you tried to pass arguments to a command use -- to separate them from tox ones",
8484
)
8585
return res

src/tox/tox_env/python/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def extract_base_python(cls, env_name: str) -> str | None:
145145
match = PY_FACTORS_RE_EXPLICIT_VERSION.match(env_name)
146146
if match:
147147
found = match.groupdict()
148-
candidates.append(f'{"pypy" if found["impl"] == "pypy" else ""}{found["version"]}')
148+
candidates.append(f"{'pypy' if found['impl'] == 'pypy' else ''}{found['version']}")
149149
else:
150150
for factor in env_name.split("-"):
151151
match = PY_FACTORS_RE.match(factor)
@@ -251,7 +251,7 @@ def _diff_msg(conf: dict[str, Any], old: dict[str, Any]) -> str:
251251
changed = [f"{k}={old[k]!r}->{v!r}" for k, v in conf.items() if k in old and v != old[k]]
252252
if changed:
253253
result.append(f"changed {' | '.join(changed)}")
254-
return f'python {", ".join(result)}'
254+
return f"python {', '.join(result)}"
255255

256256
@abstractmethod
257257
def prepend_env_var_path(self) -> list[Path]:

src/tox/tox_env/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def get_package_env_types(self) -> tuple[str, str] | None:
100100
self.conf.add_config(
101101
keys=["package_env"],
102102
of_type=str,
103-
default=f'{self.core["package_env"]}{"_external" if has_external_pkg else ""}',
103+
default=f"{self.core['package_env']}{'_external' if has_external_pkg else ''}",
104104
desc="tox environment used to package",
105105
)
106106
is_external = self.conf["package"] == "external"

tests/config/source/test_toml_pyproject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def test_config_set_env_ref(tox_project: ToxProjectCreator) -> None:
387387
]
388388
"""
389389
})
390-
outcome = project.run("c", "-e" "t", "-k", "set_env", "--hashseed", "1")
390+
outcome = project.run("c", "-et", "-k", "set_env", "--hashseed", "1")
391391
outcome.assert_success()
392392
out = (
393393
"[testenv:t]\n"

tests/test_run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def test_custom_work_dir(tox_project: ToxProjectCreator, tmp_path: Path) -> None
4343
assert outcome.state.conf.core["work_dir"], f"should set work_dir to {expected_work_dir}"
4444

4545
assert outcome.state.conf.core["tox_root"] == expected_tox_root, "should not update the value of tox_root"
46-
assert outcome.state.conf.core["work_dir"] != (
47-
expected_tox_root / ".tox"
48-
), "should explicitly demonstrate that tox_root and work_dir are decoupled"
46+
assert outcome.state.conf.core["work_dir"] != (expected_tox_root / ".tox"), (
47+
"should explicitly demonstrate that tox_root and work_dir are decoupled"
48+
)
4949

5050
# should update config values that depend on work_dir
5151
assert outcome.state.conf.core["temp_dir"] == expected_work_dir / ".tmp"

tests/tox_env/python/pip/req/test_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def test_req_path_with_space_escape(tmp_path: Path) -> None:
423423
dep_requirements_file = tmp_path / "a b"
424424
dep_requirements_file.write_text("c")
425425
path = f"-r {dep_requirements_file!s}"
426-
path = f'{path[: -len("a b")]}a\\ b'
426+
path = f"{path[: -len('a b')]}a\\ b"
427427

428428
requirements_file = tmp_path / "req.txt"
429429
requirements_file.write_text(path)

0 commit comments

Comments
 (0)