Skip to content

False positive SLOT000 on Enum subclasses #9890

@jamesbraza

Description

@jamesbraza

With ruff==0.2.1 and Python 3.12:

from enum import Enum

class MyEnum(Enum):
    pass

class CustomStrEnum(str, MyEnum):  # Throws SLOT000
    pass

I think this is a false positive for SLOT000 based on #5748. At the time, looks like Ruff decided not to check for this.

However, maybe nowadays it's possible, and it is a false positive SLOT000. Do you think we can fix this false positive

Metadata

Metadata

Assignees

Labels

ruleImplementing or modifying a lint rule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions