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
This really can't happen properly without constructing a control-flow graph of nodes for lookup, which pylint currently doesn't have the ability to do unfortunately. Currently we only do lookups by 'scope' (if statement blocks do not have scope).
Don't expect this to be fixed for a long while yet :(
Closing as duplicate of #85
Also reported as #12, #1376
Steps to reproduce
Lint the following:
Current behavior
pylint doesn't catch that "some_value" is not defined in the "else" block.
Expected behavior
I'm thinking pylint should be able to catch that "some_value" is not defined in the "else" block.
pylint --version output
Using config file /home/tech/.pylintrc
pylint 1.8.2,
astroid 1.6.1
Python 3.6.4 (default, Jan 30 2018, 17:36:50)
[GCC 6.3.0 20170516]
The text was updated successfully, but these errors were encountered: