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
This seems incorrect to me. A Literal represents a value of that exact type, not a similar value of a subtype. Pyright isn't even consistent about it; it doesn't treat Literal[False] as a subtype of Literal[0].
Uh oh!
There was an error while loading. Please reload this page.
Feature
The following (mypy playground) should pass, i.e. recognize
StrEnum
values as subtypes of the correspondingLiteral
.pyright
supports this feature since version 1.1.375 (playground)ty
supports it (playground)The text was updated successfully, but these errors were encountered: