Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive SLOT000 on Enum subclasses #9890

Closed
jamesbraza opened this issue Feb 8, 2024 · 1 comment · Fixed by #11006
Closed

False positive SLOT000 on Enum subclasses #9890

jamesbraza opened this issue Feb 8, 2024 · 1 comment · Fixed by #11006
Assignees
Labels
rule Implementing or modifying a lint rule

Comments

@jamesbraza
Copy link
Contributor

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

@AlexWaygood AlexWaygood added the rule Implementing or modifying a lint rule label Feb 8, 2024
@charliermarsh
Copy link
Member

We can fix this for references in the same file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants