summaryrefslogtreecommitdiff
path: root/checkers/classes.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2011-01-06 10:49:14 +0100
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2011-01-06 10:49:14 +0100
commit30c5da98a1fd839c226b566b40fcf898f900a77a (patch)
tree47e3c8d79234552169b1739d07c132a7fb0b2fbd /checkers/classes.py
parent7211e22da15094c0117b201ebf44f0dff438db90 (diff)
downloadpylint-30c5da98a1fd839c226b566b40fcf898f900a77a.tar.gz
avoid W0221 or W0222 when *args and **kwargs are in use. Patch by Charles Duffy.
Diffstat (limited to 'checkers/classes.py')
-rw-r--r--checkers/classes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/checkers/classes.py b/checkers/classes.py
index 909316a..856bad2 100644
--- a/checkers/classes.py
+++ b/checkers/classes.py
@@ -503,6 +503,9 @@ instance attributes.'}
# don't care about functions with unknown argument (builtins)
if method1.args.args is None or refmethod.args.args is None:
return
+ # if we use *args, **kwargs, skip the below checks
+ if method1.args.vararg or method1.args.kwarg:
+ return
if len(method1.args.args) != len(refmethod.args.args):
self.add_message('W0221', args=class_type, node=method1)
elif len(method1.args.defaults) < len(refmethod.args.defaults):