You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression on master branch: false-positive error for enum mixin data types #12258
Using the current master branch, mypy reports a false positive error for the following snippet of code:
fromenumimportEnumclassMyEnum(Enum): ...
classBytesEnum(bytes, MyEnum): ... # error: Only a single data type mixin is allowed for Enum subtypes, found extra "enum_test.MyEnum"
The error is not reported using mypy 0.931.
Expected behaviour
There should be no error reported; this works fine at runtime (and this inheritance structure is in fact used within enum.py in the CPython stdlib).
Activity
hauntsaninja commentedon Feb 27, 2022
Looks like an issue in #12026. We could revert for now if blocking a release.
Fix enum regression #12258 (#12260)