mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 21:01:52 +08:00
Fix signature of CaseInsensitiveDict (#1873)
The values can be more than just strings.
This commit is contained in:
committed by
Jelle Zijlstra
parent
c5bb3aa547
commit
fe5e12795f
12
third_party/2and3/requests/structures.pyi
vendored
12
third_party/2and3/requests/structures.pyi
vendored
@@ -1,9 +1,11 @@
|
||||
from typing import Any, Iterator, MutableMapping, Text, Tuple, Union
|
||||
from typing import Any, Iterator, MutableMapping, Tuple, TypeVar, Generic
|
||||
|
||||
class CaseInsensitiveDict(MutableMapping[str, Union[Text, bytes]]):
|
||||
def lower_items(self) -> Iterator[Tuple[str, Union[Text, bytes]]]: ...
|
||||
def __setitem__(self, key: str, value: Union[Text, bytes]) -> None: ...
|
||||
def __getitem__(self, key: str) -> Union[Text, bytes]: ...
|
||||
_VT = TypeVar('_VT')
|
||||
|
||||
class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]):
|
||||
def lower_items(self) -> Iterator[Tuple[str, _VT]]: ...
|
||||
def __setitem__(self, key: str, value: _VT) -> None: ...
|
||||
def __getitem__(self, key: str) -> _VT: ...
|
||||
def __delitem__(self, key: str) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user