-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Should SomeStrEnum(str, Enum)
require SLOT000
?
#5748
Comments
Looks like |
) ## Summary Matches the behavior of the upstream plugin. Closes astral-sh#5748.
Is this expected? class SuperEnum(Enum):
...
class CustomStrEnum(str, SuperEnum): # Results in "SLOT000 Subclasses of `str` should define `__slots__`"
... |
Yeah, we don't trace across base classes right now. You'd need to add |
Thanks for the quick answer :) |
Discussed in #5747
Originally posted by jamesbraza July 13, 2023
Please see the below file with Python 3.10.10:
Running
ruff==0.0.278
on this:Running
flake8-slots==0.1.5
withflake8==4.0.1
on this, there's no error:> flake8 a.py
Fwiw, 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 addedSLOT
rule inruff==0.0.273
, so notifying him.I am thinking either:
SLOT000
StrEnum
define__slots__
?The text was updated successfully, but these errors were encountered: