pylint-errors

E0236 (invalid-slots-object)

:x: Problematic code:

class Foo:
    __slots__ = ('bar', '')

    def __init__(self, bar):
        self.bar = bar
        self.setup()

    def setup(self):
        pass

:heavy_check_mark: Correct code:

class Foo:
    __slots__ = ('bar',)

    def __init__(self, bar):
        self.bar = bar
        self.setup()

    def setup(self):
        pass

Rationale:

Used when an invalid (non-string) object occurs in __slots__.