Enum @member
and nonmember
mishandled in Literal
types
#18719
Labels
@member
and nonmember
mishandled in Literal
types
#18719
Bug Report
typing.Literal
is supposed to accept enum members and not non-members (such as methods or explicitnonmember
attributes).mypy
fails to enforce the latter and support the former.To Reproduce
playground
Expected Behavior
E.A
,E.B
,E.C
E.D
,E.meth
Actual Behavior
(line 7 is a different issue reported separately)
Your Environment
mypy.ini
(and other config files): N/AThe text was updated successfully, but these errors were encountered: