diff options
author | Ashley Whetter <ashley@awhetter.co.uk> | 2018-06-02 22:48:05 -0700 |
---|---|---|
committer | Ashley Whetter <ashley@awhetter.co.uk> | 2018-06-02 22:48:05 -0700 |
commit | 53b9ccaea9c351eb46f3ba7d39cfdad2e466df29 (patch) | |
tree | a69b7df53de8c121ee59a84d3e3d2db84380ee40 /pylint/checkers/classes.py | |
parent | a7da6e534805e14094e302e5b0b19b7d16972a15 (diff) | |
download | pylint-git-53b9ccaea9c351eb46f3ba7d39cfdad2e466df29.tar.gz |
Fixed emitting ``useless-super-delegation`` when changing the default value of keyword arguments
Closes #2022
Diffstat (limited to 'pylint/checkers/classes.py')
-rw-r--r-- | pylint/checkers/classes.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py index 6c67be558..d7ad0a05d 100644 --- a/pylint/checkers/classes.py +++ b/pylint/checkers/classes.py @@ -26,7 +26,7 @@ from __future__ import generators import collections -from itertools import zip_longest +from itertools import chain, zip_longest import sys import astroid @@ -189,7 +189,8 @@ def _has_different_parameters_default_value(original, overridden): if original.args is None or overridden.args is None: return False - original_param_names = [param.name for param in original.args] + all_args = chain(original.args, original.kwonlyargs) + original_param_names = [param.name for param in all_args] default_missing = object() for param_name in original_param_names: try: |