summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-01-09 11:12:15 +0200
committercpopa <devnull@localhost>2014-01-09 11:12:15 +0200
commitf02fb1f0f582ff8a66cd50e1a08bce5a507a3cdc (patch)
tree6eec61b16b812f45ff6669752cd77c9c5794c20d
parent12a7edcc811c921875eb794e5e1e8985fe978c68 (diff)
downloadpylint-f02fb1f0f582ff8a66cd50e1a08bce5a507a3cdc.tar.gz
Various fixes for #128
-rw-r--r--checkers/utils.py2
-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