summaryrefslogtreecommitdiff
path: root/tests/functional/f/first_arg.py
blob: 16824d4f2802ca63a83a2b86999a4c2a3a63ffb4 (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
33
34
35
36
37
38
39
40
41
42
# pylint: disable=missing-docstring, useless-object-inheritance
"""check for methods first arguments
"""

__revision__ = 0


class Obj(object):
    # C0202, classmethod
    def __new__(something):  # [bad-classmethod-argument]
        pass

    # C0202, classmethod
    def class1(cls):
        pass
    class1 = classmethod(class1)  # [no-classmethod-decorator]

    def class2(other):  # [bad-classmethod-argument]
        pass
    class2 = classmethod(class2)  # [no-classmethod-decorator]


class Meta(type):
    # C0204, metaclass __new__
    def __new__(other, name, bases, dct):  # [bad-mcs-classmethod-argument]
        pass

    # C0203, metaclass method
    def method1(cls):
        pass

    def method2(other):  # [bad-mcs-method-argument]
        pass

    # C0205, metaclass classmethod
    def class1(cls):
        pass
    class1 = classmethod(class1)  # [no-classmethod-decorator]

    def class2(other):  # [bad-mcs-classmethod-argument]
        pass
    class2 = classmethod(class2)  # [no-classmethod-decorator]