Skip to content

Commit 21888b5

Browse files
pre-commit-ci[bot]henryiiimayeut
authored
[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](astral-sh/ruff-pre-commit@v0.9.10...v0.11.0) * chore: use Path.iterdir Signed-off-by: Henry Schreiner <[email protected]> * fix: Path.iterdir usage os.listdir returned entry names rather than their full path --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <[email protected]> Co-authored-by: mayeut <[email protected]>
1 parent 54a0cd0 commit 21888b5

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: trailing-whitespace
1515

1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.9.10
17+
rev: v0.11.0
1818
hooks:
1919
- id: ruff
2020
args: ["--fix", "--show-fixes"]

test/test_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_overridden_path(tmp_path, capfd):
8989
},
9090
)
9191

92-
assert len(os.listdir(output_dir)) == 0
92+
assert len(list(output_dir.iterdir())) == 0
9393
captured = capfd.readouterr()
9494
assert "python available on PATH doesn't match our installed instance" in captured.err.replace(
9595
"venv", "installed"

test/test_from_sdist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def cibuildwheel_from_sdist_run(
5353
env=env,
5454
check=True,
5555
)
56-
return os.listdir(tmp_output_dir)
56+
return [p.name for p in Path(tmp_output_dir).iterdir()]
5757

5858

5959
# tests

test/test_testing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import inspect
2-
import os
32
import subprocess
43
import textwrap
54
from pathlib import Path
@@ -180,7 +179,7 @@ def test_failing_test(tmp_path):
180179
},
181180
)
182181

183-
assert len(os.listdir(output_dir)) == 0
182+
assert len(list(output_dir.iterdir())) == 0
184183

185184

186185
@pytest.mark.parametrize("test_runner", ["pytest", "unittest"])

test/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def cibuildwheel_run(
140140
cwd=project_path,
141141
check=True,
142142
)
143-
wheels = os.listdir(output_dir or tmp_output_dir)
143+
wheels = [p.name for p in (output_dir or Path(tmp_output_dir)).iterdir()]
144144
return wheels
145145

146146

0 commit comments

Comments
 (0)