We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PTH201
Path("")
The following 3 snippets are the equivalent, though Path("") is not detected:
from pathlib import Path Path() # correct code Path("") # no error Path(".") # PTH201
Ruff output:
$ ruff x.py x.py:5:6: PTH201 [*] Do not pass the current directory explicitly to `Path`
Expected output:
Ruff should emit an error for Path(""). This is a fairly common idiom according to grep.app, and is currently detected in Refurb.
The text was updated successfully, but these errors were encountered:
Can I fix this?
Sorry, something went wrong.
Go for it :)
Successfully merging a pull request may close this issue.
The following 3 snippets are the equivalent, though
Path("")
is not detected:Ruff output:
Expected output:
Ruff should emit an error for
Path("")
. This is a fairly common idiom according to grep.app, and is currently detected in Refurb.The text was updated successfully, but these errors were encountered: