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
That said, it does look like it could be an error, or maybe it would
be an error in a more complicated case, so maybe a warning could be
emitted -- possibly-unsubscriptable-object or something like that.
I've come around to the belief that control flow should be as statically analyzable as possible. The example code here is terrible in that regard, even if it does happen to work out at runtime. So the warning is appropriate.
Steps to reproduce
Current behavior
E: 7,13: Value 'state' is unsubscriptable (unsubscriptable-object)
Expected behavior
state
is subscriptable by the time it gets subscripted, so thaterror is wrong. After all, the code runs:
That said, it does look like it could be an error, or maybe it would
be an error in a more complicated case, so maybe a warning could be
emitted --
possibly-unsubscriptable-object
or something like that.Related to, but more specific than, #701
pylint --version output
The text was updated successfully, but these errors were encountered: