pylint-errors

C0202 (bad-classmethod-argument)

:x: Problematic code:

class Foo:
    def __new__(some):
        pass

:heavy_check_mark: Correct code:

class Foo:
    def __new__(cls):
        pass

Rationale:

Used when a class method has a first argument named differently than the value specified in valid-classmethod-first-arg option (default to “cls”), recommended to easily differentiate them from regular instance methods.