[pre-commit.ci] pre-commit autoupdate (#2320)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.10 → v0.11.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.10...v0.11.0) * chore: use Path.iterdir Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * fix: Path.iterdir usage os.listdir returned entry names rather than their full path --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: mayeut <mayeut@users.noreply.github.com>
This commit is contained in:
co-authored by
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Henry Schreiner
mayeut
parent
54a0cd0b22
commit
21888b531f
@@ -14,7 +14,7 @@ repos:
|
||||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.9.10
|
||||
rev: v0.11.0
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--fix", "--show-fixes"]
|
||||
|
||||
@@ -89,7 +89,7 @@ def test_overridden_path(tmp_path, capfd):
|
||||
},
|
||||
)
|
||||
|
||||
assert len(os.listdir(output_dir)) == 0
|
||||
assert len(list(output_dir.iterdir())) == 0
|
||||
captured = capfd.readouterr()
|
||||
assert "python available on PATH doesn't match our installed instance" in captured.err.replace(
|
||||
"venv", "installed"
|
||||
|
||||
@@ -53,7 +53,7 @@ def cibuildwheel_from_sdist_run(
|
||||
env=env,
|
||||
check=True,
|
||||
)
|
||||
return os.listdir(tmp_output_dir)
|
||||
return [p.name for p in Path(tmp_output_dir).iterdir()]
|
||||
|
||||
|
||||
# tests
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import inspect
|
||||
import os
|
||||
import subprocess
|
||||
import textwrap
|
||||
from pathlib import Path
|
||||
@@ -180,7 +179,7 @@ def test_failing_test(tmp_path):
|
||||
},
|
||||
)
|
||||
|
||||
assert len(os.listdir(output_dir)) == 0
|
||||
assert len(list(output_dir.iterdir())) == 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize("test_runner", ["pytest", "unittest"])
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ def cibuildwheel_run(
|
||||
cwd=project_path,
|
||||
check=True,
|
||||
)
|
||||
wheels = os.listdir(output_dir or tmp_output_dir)
|
||||
wheels = [p.name for p in (output_dir or Path(tmp_output_dir)).iterdir()]
|
||||
return wheels
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user