[pre-commit.ci] pre-commit autoupdate (#2739)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.14 → v0.15.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.14...v0.15.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Refactor test_command checks to use set syntax

* Apply suggestion from @henryiii

* [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>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
pre-commit-ci[bot]
2026-02-13 11:24:27 -05:00
committed by GitHub
co-authored by pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Henry Schreiner
parent 8879b0f013
commit 57e8757899
5 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -687,7 +687,7 @@ def test_wheel(state: BuildState, wheel: Path, *, build_frontend: str) -> None:
)
# Android doesn't support placeholders in the test command.
if any(("{" + placeholder + "}") in test_command for placeholder in ["project", "package"]):
if any(("{" + placeholder + "}") in test_command for placeholder in ("project", "package")):
msg = (
f"Test command {test_command!r} with a "
"'{project}' or '{package}' placeholder is not supported on Android, "
@@ -697,12 +697,12 @@ def test_wheel(state: BuildState, wheel: Path, *, build_frontend: str) -> None:
# Parse test-command.
test_args = shlex.split(test_command)
if test_args[0] in ["python", "python3"] and any(arg in test_args for arg in ["-c", "-m"]):
if test_args[0] in {"python", "python3"} and any(arg in test_args for arg in ("-c", "-m")):
# Forward the args to the CPython testbed script. We require '-c' or '-m'
# to be in the command, because without those flags, the testbed script
# will prepend '-m test', which will run Python's own test suite.
del test_args[0]
elif test_args[0] in ["pytest"]:
elif test_args[0] == "pytest":
# We transform some commands into the `python -m` form, but this is deprecated.
msg = (
f"Test command {test_command!r} is not supported on Android. "