diff --git a/third_party/2and3/requests/structures.pyi b/third_party/2and3/requests/structures.pyi index ad9044f2b..9956e9c5a 100644 --- a/third_party/2and3/requests/structures.pyi +++ b/third_party/2and3/requests/structures.pyi @@ -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: ...