diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-07 11:40:57 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-07 11:40:57 +0300 |
commit | bb6863c2aae937fa97f98fa927dd27148f952e40 (patch) | |
tree | 2cf1533ec74c68bb7e2dab922ee1dfb7a590b747 | |
parent | 4b887f72eb67cc6f3324c396c826008e34476959 (diff) | |
download | pylint-bb6863c2aae937fa97f98fa927dd27148f952e40.tar.gz |
Remove the starargs verification code, since it is obsolete after the AST changes related to Starred nodes in the call args
-rw-r--r-- | pylint/checkers/typecheck.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index 5f2bb23..b6ba698 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -564,23 +564,7 @@ accessed. Python regular expressions are accepted.'} self.add_message('unexpected-keyword-arg', node=node, args=(keyword, callable_name)) - # 3. Match the *args, if any. Note that Python actually processes - # *args _before_ any keyword arguments, but we wait until after - # looking at the keyword arguments so as to make a more conservative - # guess at how many values are in the *args sequence. - if node.starargs: - for i in range(num_positional_args, len(parameters)): - [(name, defval), assigned] = parameters[i] - # Assume that *args provides just enough values for all - # non-default parameters after the last parameter assigned by - # the positional arguments but before the first parameter - # assigned by the keyword arguments. This is the best we can - # get without generating any false positives. - if (defval is not None) or assigned: - break - parameters[i][1] = True - - # 4. Match the **kwargs, if any. + # 3. Match the **kwargs, if any. if node.kwargs: for i, [(name, defval), assigned] in enumerate(parameters): # Assume that *kwargs provides values for all remaining |