summaryrefslogtreecommitdiff
path: root/tests/functional/t/too/too_many_arguments.py
blob: f4a668f53f459b3824e45a0c70463f32cf924044 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# pylint: disable=missing-docstring,wrong-import-position,unnecessary-dunder-call

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


class MyClass:
    text = "MyText"

    def mymethod1(self):
        return self.text

    def mymethod2(self):
        return self.mymethod1.__get__(self, MyClass)


MyClass().mymethod2()()


# Check a false positive does not occur
from functools import partial


def root_function(first, second, third):
    return first + second + third


def func_call():
    """Test we don't emit a FP for https://github.com/pylint-dev/pylint/issues/2588"""
    partial_func = partial(root_function, 1, 2, 3)
    partial_func()
    return root_function(1, 2, 3)