diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2009-03-10 13:00:52 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2009-03-10 13:00:52 +0100 |
commit | c18e39f1dc52cb9cfc476b1f9a5fd2aa668e097c (patch) | |
tree | e185e2cc1e140b0ba27a31454cc51f1e55e5c801 /checkers/utils.py | |
parent | 1be93f6c5bca0663a9d72296f43554cfcaf0cc04 (diff) | |
download | pylint-c18e39f1dc52cb9cfc476b1f9a5fd2aa668e097c.tar.gz |
fix argnames for nested arguments in astng
Diffstat (limited to 'checkers/utils.py')
-rw-r--r-- | checkers/utils.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/checkers/utils.py b/checkers/utils.py index 00ec10b..d15ece0 100644 --- a/checkers/utils.py +++ b/checkers/utils.py @@ -18,8 +18,6 @@ """some functions that may be usefull for various checkers """ -from logilab.common import flatten - from logilab import astng from logilab.astng.utils import are_exclusive try: @@ -104,7 +102,7 @@ def is_defined_before(var_node, comp_node_types=COMP_NODE_TYPES): if _node.vars.name == varname: return True elif isinstance(_node, (astng.Lambda, astng.Function)): - if varname in flatten(_node.args.args): + if varname in _node.argnames(): return True if getattr(_node, 'name', None) == varname: return True |