-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
4 / 44 of 4 issues completedOpen
4 / 44 of 4 issues completed
Copy link
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Multiple pathlib rules recommend the use of pathlib.Path over their os equivalent even when they're used with a bytes string or directory descriptor which aren't supported by pathlib.
One such example is
import os
os.listdir(1)$ ruff --version
ruff 0.11.7
$ ruff check --isolated --select PTH208 t.py
t.py:2:1: PTH208 Use `pathlib.Path.iterdir()` instead.
|
1 | import os
2 | os.listdir(1)
| ^^^^^^^^^^ PTH208
|
Found 1 error.
Past instances of the same or similar error:
Sub-issues
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule