Method 'get_i' has no argument
54 def __getattr__(self, key):
55 return key
56
57 def get_i(): 58 return ImaginaryNumber()
59
60
Description
A method which should have the bound instance as first argument has no argument defined. Python will throw an error when you'll try to call this method.
Bad practice
class Cls:
def some_method():
...
@classmethod
def something():
...
Recommended
class Cls:
def some_method(self):
...
@classmethod
def something(cls):
...