mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-19 10:21:14 +08:00
Set generic type of SimpleCookie (#1018)
Pyright complains about `response.cookies` because the generic type isn't known. `str` may or may not be the correct type to use here. Something should be set here.
This commit is contained in:
@@ -17,7 +17,7 @@ class ContentNotRenderedError(Exception): ...
|
|||||||
class SimpleTemplateResponse(HttpResponse):
|
class SimpleTemplateResponse(HttpResponse):
|
||||||
content: Any = ...
|
content: Any = ...
|
||||||
closed: bool
|
closed: bool
|
||||||
cookies: SimpleCookie
|
cookies: SimpleCookie[str]
|
||||||
status_code: int
|
status_code: int
|
||||||
rendering_attrs: Any = ...
|
rendering_attrs: Any = ...
|
||||||
template_name: _TemplateForResponseT = ...
|
template_name: _TemplateForResponseT = ...
|
||||||
@@ -48,7 +48,7 @@ class TemplateResponse(SimpleTemplateResponse):
|
|||||||
closed: bool
|
closed: bool
|
||||||
context: RequestContext
|
context: RequestContext
|
||||||
context_data: Optional[Dict[str, Any]]
|
context_data: Optional[Dict[str, Any]]
|
||||||
cookies: SimpleCookie
|
cookies: SimpleCookie[str]
|
||||||
csrf_cookie_set: bool
|
csrf_cookie_set: bool
|
||||||
json: functools.partial
|
json: functools.partial
|
||||||
redirect_chain: List[Tuple[str, int]]
|
redirect_chain: List[Tuple[str, int]]
|
||||||
|
|||||||
Reference in New Issue
Block a user