Skip to content

Commit c0b490d

Browse files
Update pre-commit hooks (#3460)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/python-jsonschema/check-jsonschema: 0.29.4 → 0.30.0](python-jsonschema/check-jsonschema@0.29.4...0.30.0) - [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.8.3](astral-sh/ruff-pre-commit@v0.8.0...v0.8.3) - [github.com/rbubley/mirrors-prettier: v3.3.3 → v3.4.2](rbubley/mirrors-prettier@v3.3.3...v3.4.2) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent fbac078 commit c0b490d

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- repo: https://github.com/python-jsonschema/check-jsonschema
8-
rev: 0.29.4
8+
rev: 0.30.0
99
hooks:
1010
- id: check-github-workflows
1111
args: ["--verbose"]
@@ -23,7 +23,7 @@ repos:
2323
hooks:
2424
- id: validate-pyproject
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: "v0.8.0"
26+
rev: "v0.8.3"
2727
hooks:
2828
- id: ruff-format
2929
- id: ruff
@@ -38,7 +38,7 @@ repos:
3838
hooks:
3939
- id: rst-backticks
4040
- repo: https://github.com/rbubley/mirrors-prettier
41-
rev: "v3.3.3"
41+
rev: "v3.4.2"
4242
hooks:
4343
- id: prettier
4444
- repo: local

src/tox/execute/request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def shell_cmd(self) -> str:
5959
exe = str(Path(self.cmd[0]).relative_to(self.cwd))
6060
except ValueError:
6161
exe = self.cmd[0]
62-
_cmd = [exe]
63-
_cmd.extend(self.cmd[1:])
64-
return shell_cmd(_cmd)
62+
cmd = [exe]
63+
cmd.extend(self.cmd[1:])
64+
return shell_cmd(cmd)
6565

6666
def __repr__(self) -> str:
6767
return f"{self.__class__.__name__}(cmd={self.cmd!r}, cwd={self.cwd!r}, env=..., stdin={self.stdin!r})"

tests/execute/local_subprocess/test_local_subprocess.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,14 @@ def test_local_execute_basic_fail(capsys: CaptureFixture, caplog: LogCaptureFixt
234234
assert record.levelno == logging.CRITICAL
235235
assert record.msg == "exit %s (%.2f seconds) %s> %s%s"
236236
assert record.args is not None
237-
_code, _duration, _cwd, _cmd, _metadata = record.args
238-
assert _code == 3
239-
assert _cwd == cwd
240-
assert _cmd == request.shell_cmd
241-
assert isinstance(_duration, float)
242-
assert _duration > 0
243-
assert isinstance(_metadata, str)
244-
assert _metadata.startswith(" pid=")
237+
code, duration, cwd_, cmd_, metadata = record.args
238+
assert code == 3
239+
assert cwd_ == cwd
240+
assert cmd_ == request.shell_cmd
241+
assert isinstance(duration, float)
242+
assert duration > 0
243+
assert isinstance(metadata, str)
244+
assert metadata.startswith(" pid=")
245245

246246

247247
def test_command_does_not_exist(caplog: LogCaptureFixture, os_env: dict[str, str]) -> None:

tests/test_provision.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ def _make_tox_wheel(
6262
into = tmp_path_factory.mktemp("dist") # pragma: no cover
6363
from tox.version import version_tuple # noqa: PLC0415
6464

65-
_patch_version = version_tuple[2]
66-
if isinstance(_patch_version, str) and _patch_version[:3] == "dev":
65+
patch_version = version_tuple[2]
66+
if isinstance(patch_version, str) and patch_version[:3] == "dev":
6767
# Version is in the form of 1.23.dev456, we need to increment the 456 part
68-
version = f"{version_tuple[0]}.{version_tuple[1]}.dev{int(_patch_version[3:]) + 1}"
68+
version = f"{version_tuple[0]}.{version_tuple[1]}.dev{int(patch_version[3:]) + 1}"
6969
else:
70-
version = f"{version_tuple[0]}.{version_tuple[1]}.{int(_patch_version) + 1}"
70+
version = f"{version_tuple[0]}.{version_tuple[1]}.{int(patch_version) + 1}"
7171

7272
with mock.patch.dict(os.environ, {"SETUPTOOLS_SCM_PRETEND_VERSION": version}):
7373
return pkg_builder(into, Path(__file__).parents[1], ["wheel"], False) # pragma: no cover

0 commit comments

Comments
 (0)