django-stubs
django-stubs copied to clipboard
Return type of send method
Why does this send method have to return List[Tuple[Callable, Optional[str]]]
?
I have a receiver that returns List[Tuple[Callable, Dict[str, Any]]]
and I get this error:
Incompatible types in assignment (expression has type "List[Tuple[Callable[..., Any], Optional[str]]]", variable has type "List[Tuple[Callable[..., Any], Dict[Any, Any]]]")
A receiver can return any type, сan't it? But why there is an Optional[str]
in the signature of method .send
?