-
-
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
False positive used-before-assignment with try-except #5817
Labels
C: used-before-assignment
Issues related to 'used-before-assignment' check
False Positive 🦟
A message is emitted but nothing is wrong with the code
Milestone
Comments
No, it's unrelated! Pretty much the only except-related case in that method that I had not altered yet :-D |
jacobtylerwalls
added a commit
to jacobtylerwalls/pylint
that referenced
this issue
Mar 29, 2022
…ltered comprehensions The prior fixes in pylint-dev#5586 and pylint-dev#5817 still relied on assumptions of direct parentage.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C: used-before-assignment
Issues related to 'used-before-assignment' check
False Positive 🦟
A message is emitted but nothing is wrong with the code
Bug description
The following code will raise a
used-before-assignment
error:Configuration
No response
Command used
Pylint output
Expected behavior
Expected no error, since the variable
e
in the try-except and thee
in the list comprehension use different scopes.Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: