Use protocol to type tr function
Functions taking keyword arguments are difficult(can't?) be typed as Callable[...]
. Using a protocol with a __call__
method seems to be a solution.
Functions taking keyword arguments are difficult(can't?) be typed as Callable[...]
. Using a protocol with a __call__
method seems to be a solution.