From e98abf0d1835fac5205e242959d3c81e1321426f Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Mon, 11 Sep 2023 20:59:01 +0200 Subject: [PATCH] Properly type SimpleCookie. This definition makes it usable even in pyright's strict mode. See https://github.com/microsoft/pyright/issues/5927 for details. --- django-stubs/http/cookie.pyi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/django-stubs/http/cookie.pyi b/django-stubs/http/cookie.pyi index 4e5654e6c6..e2a35802f1 100644 --- a/django-stubs/http/cookie.pyi +++ b/django-stubs/http/cookie.pyi @@ -1,5 +1,8 @@ +from http import cookies from typing import Any -SimpleCookie: Any +from typing_extensions import TypeAlias + +SimpleCookie: TypeAlias = cookies.SimpleCookie[Any] def parse_cookie(cookie: str) -> dict[str, str]: ...