diff options
-rw-r--r-- | checkers/utils.py | 2 | ||||
-rw-r--r-- | test/input/func_with_used_before_assignment.py (renamed from test/input/func_with_e0601.py) | 0 | ||||
-rw-r--r-- | test/messages/func_with_used_before_assignment.txt (renamed from test/messages/func_with_e0601.txt) | 0 |
3 files changed, 1 insertions, 1 deletions
diff --git a/checkers/utils.py b/checkers/utils.py index a193220..7387711 100644 --- a/checkers/utils.py +++ b/checkers/utils.py @@ -156,7 +156,7 @@ def is_defined_before(var_node): if expr.parent_of(var_node): break if (vars and - not isinstance(vars, astroid.AssAttr) and + isinstance(vars, astroid.AssName) and vars.name == varname): return True elif isinstance(_node, (astroid.Lambda, astroid.Function)): diff --git a/test/input/func_with_e0601.py b/test/input/func_with_used_before_assignment.py index c79815c..c79815c 100644 --- a/test/input/func_with_e0601.py +++ b/test/input/func_with_used_before_assignment.py diff --git a/test/messages/func_with_e0601.txt b/test/messages/func_with_used_before_assignment.txt index dc6e386..dc6e386 100644 --- a/test/messages/func_with_e0601.txt +++ b/test/messages/func_with_used_before_assignment.txt |