summaryrefslogtreecommitdiff
path: root/checkers/utils.py
diff options
context:
space:
mode:
authorsylvain thenault <sylvain.thenault@logilab.fr>2009-03-19 11:48:40 +0100
committersylvain thenault <sylvain.thenault@logilab.fr>2009-03-19 11:48:40 +0100
commit8df413be17bde57d16b0d4c6a3fd4617546cfdd4 (patch)
treed243a8eb51a391755f32caa2dafd64dcaf33b6e3 /checkers/utils.py
parenta112392fc109cdc17f90ea6c9632f9be04adc929 (diff)
downloadpylint-astng2.tar.gz
use .fromlineno, not .linenoastng2
Diffstat (limited to 'checkers/utils.py')
-rw-r--r--checkers/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/checkers/utils.py b/checkers/utils.py
index 27e508f..41b09e3 100644
--- a/checkers/utils.py
+++ b/checkers/utils.py
@@ -111,8 +111,8 @@ def is_defined_before(var_node, comp_node_types=COMP_NODE_TYPES):
# possibly multiple statements on the same line using semi colon separator
stmt = var_node.statement()
_node = stmt.previous_sibling()
- lineno = stmt.lineno
- while _node and _node.lineno == lineno:
+ lineno = stmt.fromlineno
+ while _node and _node.fromlineno == lineno:
for ass_node in _node.nodes_of_class(astng.AssName):
if ass_node.name == varname:
return True