summaryrefslogtreecommitdiff
path: root/checkers/utils.py
diff options
context:
space:
mode:
authorsylvain thenault <sylvain.thenault@logilab.fr>2009-01-15 08:53:52 +0100
committersylvain thenault <sylvain.thenault@logilab.fr>2009-01-15 08:53:52 +0100
commit714b1e8596df7895450773a7dce491aa66a53828 (patch)
tree1785904ba82fd5e78d2cbb35121c61e6d6a390c8 /checkers/utils.py
parent60a172ea8f5c76dd7561592fbc23b5e02715699a (diff)
downloadpylint-714b1e8596df7895450773a7dce491aa66a53828.tar.gz
fix #6954, patch contributed by Mads Kiilerich
Diffstat (limited to 'checkers/utils.py')
-rw-r--r--checkers/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/checkers/utils.py b/checkers/utils.py
index 575a715..036a4cd 100644
--- a/checkers/utils.py
+++ b/checkers/utils.py
@@ -102,6 +102,9 @@ def is_defined_before(var_node, comp_node_types=COMP_NODE_TYPES):
for ass_node in _node.assign.nodes_of_class(astng.AssName):
if ass_node.name == varname:
return True
+ elif isinstance(_node, astng.With):
+ if _node.vars.name == varname:
+ return True
elif isinstance(_node, (astng.Lambda, astng.Function)):
if varname in flatten(_node.argnames):
return True