-
-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GetResponseAsyncCallable? / typing of MiddlewareMixin #1269
Comments
Sounds good. I think this type should live in In fact, the |
Looking at the definition here
django-stubs/django-stubs/utils/decorators.pyi Lines 17 to 19 in 04d5696
Please let me know if I am missing something. I'll raise a PR adding the |
Huh? I think the #1425 PR is incomplete.
|
Given the following middleware, type checking fails:
Adding and using
AsyncGetResponseCallable
fixes this:This could also be handled in
GetResponseCallable
directly (via union), but would be less explicit then.Maybe it is also a good idea to add support to it to MiddlewareMixin, where it would be typed based on the input of
get_response
passed to__init__
then.The text was updated successfully, but these errors were encountered: