-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Inconsistent undefined-variable reporting #5399
Comments
Might be the same as #5326, and in fact, I would be willing to rephrase it if you can help me :-). |
I think what they share is the second instance of the name "consuming" the first instance where the first instance is a type annotation. |
How can I help? |
Pylint doesn't work too well for |
… a type annotation is accessed multiple times
… a type annotation is accessed multiple times
… a type annotation is accessed multiple times
… a type annotation is accessed multiple times
…lid type annotations or default arguments (#5727)
Bug description
The following code:
produces only 1 error report instead of 3.
Command used
Pylint output
test.pyi:5: [E0602(undefined-variable), A.z] Undefined variable 'A'
Expected behavior
Error should be reported in lines 3, 4 and 5.
Pylint version
OS / Environment
Ubuntu 20.04.3 LTS \n \l
Linux ubuntu 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: