-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrong
Description
Mypy gives a bogus error when giving a lambda that returns None
when a callable returning None
is expected:
from typing import Callable
def f(x: Callable[[], None]) -> None: pass
# Argument 1 to "f" has incompatible type Callable[[], None]; expected Callable[[], None]
f(lambda: None)
Likely this is due to Void
vs. NoneTyp
, and we'd have to replace an inferred NoneTyp
of a lambda expression with Void
.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong