diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2006-11-23 15:43:19 +0100 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2006-11-23 15:43:19 +0100 |
commit | 89d66c978b1f0b2364fd0ca47d314e1200081b05 (patch) | |
tree | e34cffe73c6a6361e7a6fd5e080253e7483cd0bd /checkers | |
parent | c5406a76a66c4dc30021ca25e7e28b5a23c30c42 (diff) | |
download | pylint-git-89d66c978b1f0b2364fd0ca47d314e1200081b05.tar.gz |
#2508: E0601 false positive with lambda
Diffstat (limited to 'checkers')
-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 ba8bd4134..0f41631f7 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 |