From 902ed2e315dbd11014524f2fbb39841f1794182f Mon Sep 17 00:00:00 2001 From: w0rp Date: Thu, 23 Jun 2022 09:50:09 +0100 Subject: [PATCH] Set generic type of SimpleCookie 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. --- django-stubs/template/response.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django-stubs/template/response.pyi b/django-stubs/template/response.pyi index d776a868a..18306f566 100644 --- a/django-stubs/template/response.pyi +++ b/django-stubs/template/response.pyi @@ -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]]