This is obvious when you think about it, but it took a while to register in your head. Lambda is a function. There is no function type, but typingthere is a type in the package Callable. The solution to this problem is
from typing import Callable
def my_function(some_lambda: Callable) -> None:
Python version 2:
from typing import Callable
def my_function(some_lambda):
source
share