Method has no argument
813 """A namespace object that can hold arbitrary attributes. It may be
814 initialized from a dictionary or with keyword arguments."""
815
816 def __init__(*args: t.Any, **kwargs: t.Any) -> None: # noqa: B902817 self, args = args[0], args[1:]
818 self.__attrs = dict(*args, **kwargs)
819
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):
...