Files
django-stubs/django-stubs/middleware/cache.pyi
PIG208 c0414c7b02 Reflect the deprecation of get_response being None. (#1086)
* Reflect the deprecation of get_response being None.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>

* Type get_response with a callback protocol.

Otherwise, calling `self.get_response(request)` in a subclass of
`MiddlewareMixin` runs into `Invalid self argument` error.

This is a workaround for https://github.com/python/mypy/issues/5485.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-09-03 23:53:14 +03:00

1.1 KiB