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
22: error: Argument 1 to "len" has incompatible type "Iterable[int]"; expected "Sized"
What is the behavior/output you expect? I would expect argument 1 to len to take List[int], because that is what T should be instantiated to. I would expect fine_2 and bad to both typecheck; inlining the expression should not change its type.
What are the versions of mypy and Python you are using? Mypy 0.720, Python 3.7.4.
Do you see the same issue after installing mypy from Git master? Yes, with mypy-0.730+dev.8782ae7f789ad5b8cab97d3c8419f9f98b6eb285.
What are the mypy flags you are using? Just the defaults.
Some things I tried:
Replace the type var for take_while with a fresh type var U = TypeVar('U'). This did not help.
Change the lambdas into defs with type annotations. This did not help.
The text was updated successfully, but these errors were encountered:
What is the behavior/output you expect? I would expect argument 1 to
len
to takeList[int]
, because that is whatT
should be instantiated to. I would expectfine_2
andbad
to both typecheck; inlining the expression should not change its type.What are the versions of mypy and Python you are using? Mypy 0.720, Python 3.7.4.
Do you see the same issue after installing mypy from Git master? Yes, with
mypy-0.730+dev.8782ae7f789ad5b8cab97d3c8419f9f98b6eb285
.What are the mypy flags you are using? Just the defaults.
Some things I tried:
take_while
with a fresh type varU = TypeVar('U')
. This did not help.The text was updated successfully, but these errors were encountered: