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
We currently display Literal[1, 2] | Literal["foo"], but the spec (and other type checkers) prefer Literal[1, 2, "foo"]. We allow the latter in an annotation, but we don't display it that way.
We should probably switch to displaying this like the spec and other type checkers do.
I would leave class and function literals out of this change, since they aren't part of the spec and we may want to display them entirely differently.
The text was updated successfully, but these errors were encountered:
We currently display
Literal[1, 2] | Literal["foo"]
, but the spec (and other type checkers) preferLiteral[1, 2, "foo"]
. We allow the latter in an annotation, but we don't display it that way.We should probably switch to displaying this like the spec and other type checkers do.
I would leave class and function literals out of this change, since they aren't part of the spec and we may want to display them entirely differently.
The text was updated successfully, but these errors were encountered: