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 think the issue here is that mypy uses external type context (coming from argument annotation of from_iterable) to infer the filter type variable, instead of second argument type context. This is an infinite story about "single bucket inference". The plan I proposed a while ago for switching to hybrid/compromise inference scheme would solve this (as well as many other similar issues here on the tracker), but it is unlikely to happen anytime soon (or ever).
In the following, very reduced code line
d
does not typecheck.The interesting or surprising part is that inside the
d
line mypy thinks thatints
isIterable[int]
.Tried mypy 0.782 and mypy-0.790+dev.4cf246f3bb2589d343fe1fdb67a42a23a23c041b.dirty
The text was updated successfully, but these errors were encountered: