From 1fac3058ed275f5860e67bcdb7aac05a0c4b2017 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 9 Nov 2022 11:53:27 -0800 Subject: [PATCH] Add Optional to LANGUAGE_COOKIE_SAMESITE Reverse an incorrect edit that was squashed into my change in #1228. The default value of LANGUAGE_COOKIE_SAMESITE is None, so an annotation that excludes None is not type-safe. Signed-off-by: Anders Kaseorg --- django-stubs/conf/global_settings.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-stubs/conf/global_settings.pyi b/django-stubs/conf/global_settings.pyi index d18699366..24014e8bd 100644 --- a/django-stubs/conf/global_settings.pyi +++ b/django-stubs/conf/global_settings.pyi @@ -62,7 +62,7 @@ LANGUAGE_COOKIE_AGE: Optional[int] = ... LANGUAGE_COOKIE_DOMAIN: Optional[str] = ... LANGUAGE_COOKIE_PATH: str = ... LANGUAGE_COOKIE_HTTPONLY: bool = ... -LANGUAGE_COOKIE_SAMESITE: Literal["Lax", "Strict", "None", False] = ... +LANGUAGE_COOKIE_SAMESITE: Optional[Literal["Lax", "Strict", "None", False]] = ... # If you set this to True, Django will format dates, numbers and calendars # according to user current locale.