klein
klein copied to clipboard
Fix typing for async route methods
Add some async methods to typing_app.py to verify that those work… and they do not:
src/klein/test/typing_app.py:87:6: error: Value of type variable "KleinRouteHandlerT" of function cannot be
"Callable[[Application, IRequest], Coroutine[Any, Any, Union[Union[Union[str, bytes, IResource, IRenderable, Tag, None], Iterable[Union[str, bytes, IResource, IRenderable, Tag, None]]], Awaitable[Union[Union[str, bytes, IResource, IRenderable, Tag, None], Iterable[Union[str, bytes, IResource, IRenderable, Tag, None]]]]]]]"
[type-var]
These errors are a bit tough to read… I gave it a stab but I'm not sure why this is unhappy.