From 4c50d7d26631308c9b5cfa30b74dd107a529e820 Mon Sep 17 00:00:00 2001 From: Akuli Date: Sun, 10 Jan 2021 23:11:00 +0200 Subject: [PATCH] http.cookies._{quote,unquote} allow None (#4915) --- stdlib/3/http/cookies.pyi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stdlib/3/http/cookies.pyi b/stdlib/3/http/cookies.pyi index 9c615a6d5..14b0f817e 100644 --- a/stdlib/3/http/cookies.pyi +++ b/stdlib/3/http/cookies.pyi @@ -1,10 +1,15 @@ import sys -from typing import Any, Dict, Generic, List, Mapping, Optional, TypeVar, Union +from typing import Any, Dict, Generic, List, Mapping, Optional, TypeVar, Union, overload _DataType = Union[str, Mapping[str, Union[str, Morsel[Any]]]] _T = TypeVar("_T") - +@overload +def _quote(str: None) -> None: ... +@overload def _quote(str: str) -> str: ... +@overload +def _unquote(str: None) -> None: ... +@overload def _unquote(str: str) -> str: ... class CookieError(Exception): ...