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
NiklasRosenstein
changed the title
Callable should accept functions where call variants match the interface
Callable should accept functions and types where call variants match the interface
May 21, 2021
NiklasRosenstein
changed the title
Callable should accept functions and types where call variants match the interface
Callable does not accept functions/types where call variants match the interface
May 21, 2021
Bug Report
MyPy won't allow me to pass built-ins like
sorted
,set
orlist
to at.Callable[[T], R]
argument.To Reproduce
Expected Behavior
MyPy accepts the above code.
Actual Behavior
MyPy complains about type errors (as shown in the comments in the example)
You can work around this by wrapping the built-in in a lambda:
Your Environment
mypy test.py
mypy.ini
(and other config files): n/aThe text was updated successfully, but these errors were encountered: