-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
The following 3 snippets are the equivalent, though Path("") is not detected:
from pathlib import Path
Path() # correct code
Path("") # no error
Path(".") # PTH201Ruff 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels