-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
F401 false positives when match statements are in the file #1989
Comments
I believe this is due to our lack of support for |
I find it odd that I cannot ignore the E999. Does E999 have to block all other errors in the file? |
The issue is that if we can't parse the code, then we can't get a valid AST, and so we can't enforce a large portion of the rule set. It's a limitation of the parser right now: (1) it can't parse |
I see, that make a lot of sense. Thank you so much for explaining. 🙂 |
No prob! I know it’s not a satisfying answer, but hopefully it makes some sense. The real fix here is to get match statements working so that it’s a non-issue! |
Fixed as of v0.0.250. |
Im seeing that ruff is not finding F401's in files that have match statements.
Code snippet
You should expect that
import datetime
should cause a F401 but when runingruff /path/to/file --select F401
nothing is returned. When I remove the match statement, ruff will return the F401 issue.Im running
ruff 0.0.225
The text was updated successfully, but these errors were encountered: