-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Bug πͺ²C: Pragma'sNeeds astroid updateNeeds an astroid update (probably a release too) before being mergableNeeds an astroid update (probably a release too) before being mergableNeeds review πNeeds to be reviewed by one or multiple more personsNeeds to be reviewed by one or multiple more personsNew parserRequires a new AST parser (upstream)Requires a new AST parser (upstream)Work in progress
Description
def my_func(x):
if x:
pass
else:
# pylint: disable=protected-access
return x._foo
The disable has no effect here and a warning is generated. If any statement is insert between the else and the disable then it works properly. I suspect the line numbering for the else portion of the ast starts at the first child of the else clause rather than the else keyword itself.
dhermes, hardikmodha, earshinov, NickGoog and jwilk
Metadata
Metadata
Assignees
Labels
Bug πͺ²C: Pragma'sNeeds astroid updateNeeds an astroid update (probably a release too) before being mergableNeeds an astroid update (probably a release too) before being mergableNeeds review πNeeds to be reviewed by one or multiple more personsNeeds to be reviewed by one or multiple more personsNew parserRequires a new AST parser (upstream)Requires a new AST parser (upstream)Work in progress