F401 - First unused import not caught #10133
Answered
by
JonathanPlasse
AbdealiLoKo
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
charliermarsh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Opening this as a discussion to understand if this is a bug ?
I had a case where I had a file with something like this:
And when I ran ruff it gave:
In my opinion, this should have given me 2 lint errors: 1 for the
qwe
import which is unused. And second for thexyz
import that is unusedBut it looks like ruff is assuming that the first line is needed and being used ? Which seemed odd
Beta Was this translation helpful? Give feedback.
All reactions