diff --git a/stdlib/3/http/cookiejar.pyi b/stdlib/3/http/cookiejar.pyi index 801a5a66e..3cacc27c4 100644 --- a/stdlib/3/http/cookiejar.pyi +++ b/stdlib/3/http/cookiejar.pyi @@ -1,5 +1,3 @@ -# Stubs for http.cookiejar (Python 3.4) - from typing import Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union, overload from http.client import HTTPResponse import sys @@ -28,6 +26,7 @@ class CookieJar(Iterable['Cookie']): name: str = ...) -> None: ... def clear_session_cookies(self) -> None: ... def __iter__(self) -> Iterator['Cookie']: ... + def __len__(self) -> int: ... class FileCookieJar(CookieJar): filename = ... # type: str diff --git a/third_party/2and3/pytz/lazy.pyi b/third_party/2and3/pytz/lazy.pyi index 3618333e0..795ed0427 100644 --- a/third_party/2and3/pytz/lazy.pyi +++ b/third_party/2and3/pytz/lazy.pyi @@ -1,13 +1,14 @@ -# Stubs for pytz.lazy (Python 3.5) - -from typing import Any, Iterable, List, Set, Dict # NOQA +from typing import Iterator, List, Set, TypeVar from collections import Mapping -class LazyDict(Mapping): - pass +_T = TypeVar('_T') +_KT = TypeVar('_KT') +_VT = TypeVar('_VT') -class LazyList(List): - pass +class LazyDict(Mapping[_KT, _VT]): + def __getitem__(self, key: _KT) -> _VT: ... + def __iter__(self) -> Iterator[_KT]: ... + def __len__(self) -> int: ... -class LazySet(Set): - pass +class LazyList(List[_T]): ... +class LazySet(Set[_T]): ... diff --git a/third_party/2and3/requests/structures.pyi b/third_party/2and3/requests/structures.pyi index 53af72d8f..ad9044f2b 100644 --- a/third_party/2and3/requests/structures.pyi +++ b/third_party/2and3/requests/structures.pyi @@ -1,9 +1,12 @@ -# Stubs for requests.structures (Python 3) - from typing import Any, Iterator, MutableMapping, Text, Tuple, Union 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]: ... + def __delitem__(self, key: str) -> None: ... + def __iter__(self) -> Iterator[str]: ... + def __len__(self) -> int: ... class LookupDict(dict): name = ... # type: Any