Skip to content

abc.ABC.__slots__ should be marked with ClassVar #15364

@embecka

Description

@embecka

According to the python official documentation, slots are class variables. Therefore, in the class abc.ABC, the variable __slots__ should be annotated as ClassVar[Sequence[str]]. There is currently no annotation. It means that in all subclasses of abc.ABC, the variable __slots__ is considered as an instance variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions