mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-20 00:28:28 +08:00
http/html stubtest fixes (#5208)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Any, Dict, Generic, List, Mapping, Optional, TypeVar, Union, overload
|
||||
from typing import Any, Dict, Generic, Iterable, List, Mapping, Optional, Tuple, TypeVar, Union, overload
|
||||
|
||||
_DataType = Union[str, Mapping[str, Union[str, Morsel[Any]]]]
|
||||
_T = TypeVar("_T")
|
||||
@@ -18,10 +18,17 @@ class Morsel(Dict[str, Any], Generic[_T]):
|
||||
value: str
|
||||
coded_value: _T
|
||||
key: str
|
||||
def __init__(self) -> 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 setdefault(self, key: str, val: Optional[str] = ...) -> str: ...
|
||||
# The dict update can also get a keywords argument so this is incompatible
|
||||
@overload # type: ignore
|
||||
def update(self, values: Mapping[str, str]) -> None: ...
|
||||
@overload
|
||||
def update(self, values: Iterable[Tuple[str, str]]) -> None: ...
|
||||
def isReservedKey(self, K: str) -> bool: ...
|
||||
def output(self, attrs: Optional[List[str]] = ..., header: str = ...) -> str: ...
|
||||
def js_output(self, attrs: Optional[List[str]] = ...) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user