-
-
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
Example where pylint does not detect uninitialized variable #4045
Comments
@socketpair thanks for the report. It makes sense. |
On main, this is only reproducible because of the context manager, which fails the following check (the context manager gets between the assignment and the TryExcept, so the TryExcept is actually two parents up): |
Might be fixable with |
You can assign this to me, I'll give it a spin and report back. |
… when emitting `used-before-assignment`
… when emitting `used-before-assignment`
And what about this case (should I open a separate issue?):
|
@markmark206 This actually does emit a warning on the to-be-released |
@DanielNoord this is very exciting, thank you!! I opened a separate issue before i saw this, I will go ahead and close (unless you get there before me). Thank you again!! |
Pylint should report that
old_settings
might not be initialized. Since initialization is the last operation in try...except block, any exception prevents initialization.The text was updated successfully, but these errors were encountered: