diff options
-rw-r--r-- | tests/functional/t/too/too_many_arguments.py | 29 | ||||
-rw-r--r-- | tests/functional/t/too/too_many_arguments.rc | 2 |
2 files changed, 29 insertions, 2 deletions
diff --git a/tests/functional/t/too/too_many_arguments.py b/tests/functional/t/too/too_many_arguments.py index 689745e27..8802d7130 100644 --- a/tests/functional/t/too/too_many_arguments.py +++ b/tests/functional/t/too/too_many_arguments.py @@ -1,6 +1,6 @@ -# pylint: disable=missing-docstring,wrong-import-position +# pylint: disable=missing-docstring,wrong-import-position,too-few-public-methods -def stupid_function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9): # [too-many-arguments] +def stupid_function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9): # [too-many-arguments] return arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 @@ -30,3 +30,28 @@ def func_call(): partial_func = partial(root_function, 1, 2, 3) partial_func() return root_function(1, 2, 3) + + +class NoParentClass: # pylint: disable=too-many-arguments + """Test for https://github.com/PyCQA/pylint/issues/1191""" + def __init__(self, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6): + self.arg_1 = arg_1 + self.arg_2 = arg_2 + self.arg_3 = arg_3 + self.arg_4 = arg_4 + self.arg_5 = arg_5 + self.arg_6 = arg_6 + +class Base: + pass + + +class ChildOfBase(Base): # pylint: disable=too-many-arguments + """Test for https://github.com/PyCQA/pylint/issues/1191""" + def __init__(self, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6): + self.arg_1 = arg_1 + self.arg_2 = arg_2 + self.arg_3 = arg_3 + self.arg_4 = arg_4 + self.arg_5 = arg_5 + self.arg_6 = arg_6 diff --git a/tests/functional/t/too/too_many_arguments.rc b/tests/functional/t/too/too_many_arguments.rc new file mode 100644 index 000000000..373e877b0 --- /dev/null +++ b/tests/functional/t/too/too_many_arguments.rc @@ -0,0 +1,2 @@ +[DESIGN] +max-args=5 |