fix some abstract classes in third_party/ (#1486)

This commit is contained in:
Jelle Zijlstra
2017-07-19 10:27:22 -07:00
committed by Łukasz Langa
parent 11a479fd69
commit 1515ed9f88
3 changed files with 16 additions and 13 deletions

View File

@@ -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

View File

@@ -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]): ...

View File

@@ -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