diff options
Diffstat (limited to 'tests/functional/f/first_arg.py')
-rw-r--r-- | tests/functional/f/first_arg.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/functional/f/first_arg.py b/tests/functional/f/first_arg.py new file mode 100644 index 000000000..4391bc88b --- /dev/null +++ b/tests/functional/f/first_arg.py @@ -0,0 +1,42 @@ +# pylint: disable=C0111, W0232, 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] |