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
I suppose you'd want to disallow tuples of known length that's != 2, but we don't really have a syntax for that. In any case, we're merely using the typeshed annotations, so best to create an issue at https://github.com/python/typeshed.
Thank you for pointing out to typesheds. Actually, such bug even already has been reported (python/typeshed#10013), but it's closed as "not planned". Closing it here anyway, as it appears not a mypy issue.
Bug Report
When constructing dictionary from iterable of pairs mypy incorrectly requires the items to be tuples, while Python accepts any interable of iterables.
To Reproduce
The following example is pretty valid, while mypy produces error for it:
As well as the following:
Expected Behavior
mypy should accept
Iterable[Iterable[...]]
as argument todict
.Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: