diff options
author | syt <syt@localhost.localdomain> | 2006-11-23 15:43:19 +0100 |
---|---|---|
committer | syt <syt@localhost.localdomain> | 2006-11-23 15:43:19 +0100 |
commit | f4fe50e016cb3024cdb59416f43778bf7e04be82 (patch) | |
tree | e34cffe73c6a6361e7a6fd5e080253e7483cd0bd /checkers/utils.py | |
parent | 1e6b19be0415b64f13446d482e8a8ffecf232be4 (diff) | |
download | pylint-f4fe50e016cb3024cdb59416f43778bf7e04be82.tar.gz |
#2508: E0601 false positive with lambda
Diffstat (limited to 'checkers/utils.py')
-rw-r--r-- | checkers/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/checkers/utils.py b/checkers/utils.py index ba8bd41..0f41631 100644 --- a/checkers/utils.py +++ b/checkers/utils.py @@ -18,7 +18,7 @@ """some functions that may be usefull for various checkers """ -__revision__ = '$Id: utils.py,v 1.16 2006-03-03 09:25:34 syt Exp $' +from logilab.common import flatten from logilab import astng from logilab.astng.utils import are_exclusive @@ -106,7 +106,7 @@ def is_defined_before(var_node, comp_node_types=COMP_NODE_TYPES): if ass_node.name == varname: return True elif isinstance(_node, (astng.Lambda, astng.Function)): - if varname in _node.argnames: + if varname in flatten(_node.argnames): return True if getattr(_node, 'name', None) == varname: return True |