single-string-used-for-slots / C0205#

Message emitted:

Class __slots__ should be a non-string iterable

Description:

Used when a class __slots__ is a simple string, rather than an iterable.

Correct code:

class Fruit:
    __slots__ = ("name",)

    def __init__(self, name):
        self.name = name

Problematic code:

class Fruit:  # [single-string-used-for-slots]
    __slots__ = "name"

    def __init__(self, name):
        self.name = name

Created by the classes checker.