pylint-errors

C0205 (single-string-used-for-slots)

: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 a class __slots__ is a simple string, rather than an iterable.