Skip to content

Commit e5121cb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9b757b6 commit e5121cb

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

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)