mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-19 02:15:59 +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):
|
||||
content: Any = ...
|
||||
closed: bool
|
||||
cookies: SimpleCookie
|
||||
cookies: SimpleCookie[str]
|
||||
status_code: int
|
||||
rendering_attrs: Any = ...
|
||||
template_name: _TemplateForResponseT = ...
|
||||
@@ -48,7 +48,7 @@ class TemplateResponse(SimpleTemplateResponse):
|
||||
closed: bool
|
||||
context: RequestContext
|
||||
context_data: Optional[Dict[str, Any]]
|
||||
cookies: SimpleCookie
|
||||
cookies: SimpleCookie[str]
|
||||
csrf_cookie_set: bool
|
||||
json: functools.partial
|
||||
redirect_chain: List[Tuple[str, int]]
|
||||
|
||||
Reference in New Issue
Block a user