We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorry if duplicate! I couldn't find anything similar: (using mypy 0.560)
mypy 0.560
from typing import Tuple def getTuple() -> Tuple[str, str, int]: return ('Hello', 'World', 123) (s, _, _) = getTuple() # Error: Incompatible types in assignment # (expression has type "int", variable has type "str")
Seems like the unpacked tuple is inferred as (str, str, str). For this case I would assume it would infer (str, str, int) or (str, Any, Any) .
(str, str, str)
(str, str, int)
(str, Any, Any)
For comparison, in the more general case:
(s1, s2 , i) = getTuple()
The receiving tuple is inferred as (str, str, int).
The text was updated successfully, but these errors were encountered:
Sorry for this! We have heard about this often so the priority has been raised to high.
Closing as duplicate of #465
Sorry, something went wrong.
Thanks for the quick response! Sorry I couldn't find the duplicate. I didn't search with the right keywords, I guess.
No branches or pull requests
Sorry if duplicate! I couldn't find anything similar:
(using
mypy 0.560
)Seems like the unpacked tuple is inferred as
(str, str, str)
. For this case I would assume it would infer(str, str, int)
or(str, Any, Any)
.For comparison, in the more general case:
The receiving tuple is inferred as
(str, str, int)
.The text was updated successfully, but these errors were encountered: