-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
acceptedReady for implementationReady for implementationbugSomething isn't workingSomething isn't working
Description
Discussed in #5747
Originally posted by jamesbraza July 13, 2023
Please see the below file with Python 3.10.10:
from enum import Enum
class SomeStrEnum(str, Enum):
KEY = "value"Running ruff==0.0.278 on this:
> ruff --isolated --select="SLOT" a.py
a.py:3:7: SLOT000 Subclasses of `str` should define `__slots__`
Found 1 error.Running flake8-slots==0.1.5 with flake8==4.0.1 on this, there's no error:
> flake8 a.pyFwiw, Python 3.11's built-in enum.StrEnum doesn't seem to define __slots__.
I am not sure if there should or should not be SLOT000 for this. Looks like @qdegraaf added SLOT rule in ruff==0.0.273, so notifying him.
I am thinking either:
- This is a false positive of
SLOT000 - Or should the built-in
StrEnumdefine__slots__?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acceptedReady for implementationReady for implementationbugSomething isn't workingSomething isn't working