You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executed, the else block in the above example would raise UnboundLocalError: cannot access local variable 'chk' where it is not associated with a value
Pylint does not catch a simple case of variable-undefined and/or used-before-assignment:
Bug description
When executed, the
else
block in the above example would raiseUnboundLocalError: cannot access local variable 'chk' where it is not associated with a value
Is this a regression of #4045 and #5811?
Configuration
No response
Command used
Pylint output
Expected behavior
Pylint should easily catch
chk
asused-before-assignment
and/orundefined-variable
Pylint version
OS / Environment
macOS Sonoma 14.2.1 (23C71)
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: