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
Note: if you are reporting a wrong signature of a function or a class in
the standard library, then the typeshed tracker is better suited
for this report: https://github.com/python/typeshed/issues
Please provide more information to help us understand the issue:
Are you reporting a bug, or opening a feature request?
Reporting a 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.
fromtypingimport*fromitertoolsimportproductimportrandom# errora=range(2) ifrandom.random() <.5elseproduct(range(2), range(2))
enumerate(a)
# ok if you give an explicit annotationb: Union[Iterable[int], Iterable[Tuple[int, int]]] =range(2) ifrandom.random() <.5elseproduct(range(2), range(2))
enumerate(b)
What is the actual behavior/output?
main.py:7: error: Argument 1 to "enumerate" has incompatible type "object"; expected "Iterable[<nothing>]"
Note: if you are reporting a wrong signature of a function or a class in
the standard library, then the typeshed tracker is better suited
for this report: https://github.com/python/typeshed/issues
Please provide more information to help us understand the issue:
Reporting a bug
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
No error
For version information + flags, see this playground example https://mypy-play.net/?mypy=latest&python=3.6&gist=16fc66a21fa582f9431188040f1c6bda
The text was updated successfully, but these errors were encountered: