Следующее работает нормально:
Код: Выделить всё
def f(a: callable):
pass
Код: Выделить всё
def f(a: callable | None):
pass
Код: Выделить всё
TypeError: unsupported operand type(s) for |: 'builtin_function_or_method' and 'NoneType'
Подробнее здесь: https://stackoverflow.com/questions/790 ... n-callable