- Notifications
You must be signed in to change notification settings - Fork263
-
Or alternatively, an exact tuple if For example, this code (https://mypy-play.net/?mypy=latest&python=3.12&gist=1b1c487962219b0571c1b31889abac91): fromtypingimportLiteral,get_argsMyType=Literal["foo","bar","baz"]contents=get_args(MyType)reveal_type(contents)# This returns a tuple[Any, ...] but shouldn't this be a tuple[MyType, ...] or better yet a tuple[MyType, MyType, MyType]? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
-
If you can find a way to make this work, go for it, but I am not sure it's possible. |
BetaWas this translation helpful?Give feedback.
All reactions
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment