You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Selecting PTH120 rule seems to always return 0 errors.
The workaround is to drop the 0 (--select=PTH12) to actually get the errors.
I'm not aware of any other rules that has this behavior.
Example:
$ ruff check . --select=PTH120 --isolated
All checks passed!
$ ruff check . --select=PTH12 --isolated
test_pth120.py:3:1: PTH120 `os.path.dirname()` should be replaced by `Path.parent`
|
1 | import os
2 |
3 | os.path.dirname("foo/bar/baz")
| ^^^^^^^^^^^^^^^ PTH120
|
Found 1 error.
The text was updated successfully, but these errors were encountered:
Selecting PTH120 rule seems to always return 0 errors.
The workaround is to drop the 0 (--select=PTH12) to actually get the errors.
I'm not aware of any other rules that has this behavior.
Example:
The text was updated successfully, but these errors were encountered: