-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
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?
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.
from typing import TypeVar
T = TypeVar("T")
def foo(bar: T) -> T:
return bar
map(foo, [1])-
What is the actual behavior/output?
error: Argument 1 to "map" has incompatible type "Callable[[T], T]"; expected "Callable[[int], T]" -
What is the behavior/output you expect?
For mypy to successfully pass -
What are the versions of mypy and Python you are using?
Python 3.7.1 and the mypy-0.710+dev.f0491839adf2db2da74768b1d01f8e244e769f59
Do you see the same issue after installing mypy from Git master?
Yes -
What are the mypy flags you are using? (For example --strict-optional)
None -
If mypy crashed with a traceback, please paste
the full traceback below.
(You can freely edit this text, please remove all the lines
you believe are unnecessary.)