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:
w0rp
2022-06-23 11:52:31 +01:00
committed by GitHub
parent f4407155a5
commit 644052148a

View File

@@ -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]]