Expose handler type? #5842
Answered
by
Dreamsorcerer
AustinScola
asked this question in
Q&A
-
I'm writing a middleware coroutine in a project which is type-checked with mypy. I want to annotated the handler parameter similar to the following: @middleware
async def my_middleware(request: Request, handler: Handler) -> Response:
... I can't seem to find a handler type alias to use in
Maybe one should be added to P.S. Happy to contribute! |
Beta Was this translation helpful? Give feedback.
Answered by
Dreamsorcerer
Jun 30, 2021
Replies: 1 comment 1 reply
-
Duplicate #4686 I think it's probably time for someone to try this out in a PR, then we can discuss it there. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
AustinScola
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Duplicate #4686
I think it's probably time for someone to try this out in a PR, then we can discuss it there.