diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2009-03-09 12:15:17 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2009-03-09 12:15:17 +0100 |
commit | 8d279dda01a3f3a94718b1d65a689662e9b36071 (patch) | |
tree | 795a9886b758fc3a80b927b58f653732f45de1de /checkers/variables.py | |
parent | 727099b95bc24f857fe012476b75be46c4d6e38d (diff) | |
download | pylint-8d279dda01a3f3a94718b1d65a689662e9b36071.tar.gz |
replace argnames by args.args
Diffstat (limited to 'checkers/variables.py')
-rw-r--r-- | checkers/variables.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/checkers/variables.py b/checkers/variables.py index e7ba88d..515c450 100644 --- a/checkers/variables.py +++ b/checkers/variables.py @@ -42,7 +42,7 @@ def overridden_method(klass, name): # dictionary. This may happen with astng built from living objects. return None # check its a method - if getattr(meth_node, 'argnames', None) is not None: + if getattr(meth_node.args, 'args', None) is not None: return meth_node return None @@ -230,6 +230,7 @@ builtins. Remember that you should avoid to define new builtins when possible.' return authorized_rgx = self.config.dummy_variables_rgx overridden = marker = [] + args = node.args.args for name, stmts in not_consumed.iteritems(): # ignore some special names specified by user configuration if authorized_rgx.match(name): @@ -240,16 +241,15 @@ builtins. Remember that you should avoid to define new builtins when possible.' if isinstance(stmt, astng.Global): continue # care about functions with unknown argument (builtins) - if node.argnames is not None and name in node.argnames: + if args and name in args: if is_method: # don't warn for the first argument of a (non static) method - if node.type != 'staticmethod' and \ - node.argnames and name == node.argnames[0]: + if node.type != 'staticmethod' and name == args[0]: continue # don't warn for argument of an overridden method if overridden is marker: overridden = overridden_method(klass, node.name) - if overridden is not None and name in overridden.argnames: + if overridden is not None and name in overridden.args.args: continue # don't check callback arguments if node.name.startswith('cb_') or \ |