blob: 2a818ccfcad1ca39a9ca6af4da546197a12c9704 (
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, W0232, useless-object-inheritance # [use-symbolic-message-instead]
"""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]
|