mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
http.cookies: add LegalChars for py36 and below (#3639)
This commit is contained in:
committed by
Sebastian Rittau
parent
7e6dbc4393
commit
cae73edebf
@@ -1,5 +1,6 @@
|
||||
# Stubs for http.cookies (Python 3.5)
|
||||
|
||||
import sys
|
||||
from typing import Generic, Dict, List, Mapping, Optional, TypeVar, Union, Any
|
||||
|
||||
_DataType = Union[str, Mapping[str, Union[str, Morsel[Any]]]]
|
||||
@@ -11,7 +12,10 @@ class Morsel(Dict[str, Any], Generic[_T]):
|
||||
value: str
|
||||
coded_value: _T
|
||||
key: str
|
||||
def set(self, key: str, val: str, coded_val: _T) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def set(self, key: str, val: str, coded_val: _T) -> None: ...
|
||||
else:
|
||||
def set(self, key: str, val: str, coded_val: _T, LegalChars: str = ...) -> None: ...
|
||||
def isReservedKey(self, K: str) -> bool: ...
|
||||
def output(self, attrs: Optional[List[str]] = ...,
|
||||
header: str = ...) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user