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
{{ message }}
Repository navigation
no overload variant of “zip” matches argument error #9048
Are you reporting a bug, or opening a feature request?
Bug.
Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
def bug_repr() -> None:
ints = [1, 2]
floats = [3.14, 2.72]
strings = ['a', 'b']
for numeric_list in [ints, floats]:
for number, string in zip(numeric_list, strings): # <-- error here
pass
What is the actual behavior/output?
error: No overload variant of "zip" matches argument
types "object", "List[Tuple[datetime, timedelta]]" [call-overload]
for arg, result in zip(test, results):
^
note: Possible overload variants:
note: def [_T1, _T2] zip(*iterables: Tuple[_T1, _T2]) -> Tuple[Tuple[_T
1, ...], Tuple[_T2, ...]]
note: def [_T1, _T2, _T3] zip(*iterables: Tuple[_T1, _T2, _T3]) -> Tupl
e[Tuple[_T1, ...], Tuple[_T2, ...], Tuple[_T3, ...]]
note: <3 more similar overloads not shown, out of 10 total overloads>
This is fixed by reverting the typeshed change, right? The revert will go out with the next mypy release, so I don't think there's anything else for mypy to do here.
On Thu, 25 Jun 2020, 21:55 Jelle Zijlstra, ***@***.***> wrote:
This is fixed by reverting the typeshed change, right? The revert will go
out with the next mypy release, so I don't think there's anything else for
mypy to do here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9048 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALBF2OWOTIKCS5PQRKGPS3RYPWX3ANCNFSM4OI3HCPQ>
.
Activity
JelleZijlstra commentedon Jun 26, 2020
This is fixed by reverting the typeshed change, right? The revert will go out with the next mypy release, so I don't think there's anything else for mypy to do here.
staticdev commentedon Jun 26, 2020
hauntsaninja commentedon Jun 26, 2020
This is unrelated to the typeshed change (and unrelated to zip) and is not a regression. The issue is that mypy infers the type of
numeric_listto beobject, https://mypy-play.net/?mypy=latest&python=3.8&gist=d9e885a7502f7e74d6320095251f6ed2hauntsaninja commentedon Jun 26, 2020
Basically a dupe of #6968
ilevkivskyi commentedon Jul 3, 2020
Closing as such.