pylint-errors

R0201 (no-self-use)

:x: Problematic code:

class Foo:
    def __init__(self):
        self.bar = True

    def baz(self):
        return True

:heavy_check_mark: Correct code:

class Foo:
    def __init__(self):
        self.bar = True

    def baz(self):
        return self.bar

Rationale:

Used when a method doesn’t use its bound instance, and so could be written as a function.