Fixup types

This commit is contained in:
Roy Williams
2016-12-28 13:31:33 -08:00
committed by Łukasz Langa
parent 7fd08cf073
commit 844b32cc64
4 changed files with 18 additions and 32 deletions

View File

@@ -17,6 +17,8 @@ from . import utils
from . import compat
from . import status_codes
from typing import Optional, Union
default_hooks = hooks.default_hooks
CaseInsensitiveDict = structures.CaseInsensitiveDict
HTTPBasicAuth = auth.HTTPBasicAuth
@@ -77,10 +79,10 @@ class Request(RequestHooksMixin):
def prepare(self): ...
class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
method = ... # type: str
url = ... # type: str
headers = ... # type: Dict[str, str]
body = ... # type: str
method = ... # type: Optional[Union[str, unicode]]
url = ... # type: Optional[Union[str, unicode]]
headers = ... # type: CaseInsensitiveDict
body = ... # type: Optional[Union[str, unicode]]
hooks = ... # type: Any
def __init__(self) -> None: ...
def prepare(self, method=..., url=..., headers=..., files=..., data=..., params=...,

View File

@@ -1,18 +1,9 @@
# Stubs for requests.structures (Python 3)
from typing import Any
import collections
from typing import Any, Iterator, MutableMapping, Tuple, Union
class CaseInsensitiveDict(collections.MutableMapping):
def __init__(self, data=..., **kwargs) -> None: ...
def __setitem__(self, key, value): ...
def __getitem__(self, key): ...
def __delitem__(self, key): ...
def __iter__(self): ...
def __len__(self): ...
def lower_items(self): ...
def __eq__(self, other): ...
def copy(self): ...
class CaseInsensitiveDict(MutableMapping[str, Union[str, unicode]]):
def lower_items(self) -> Iterator[Tuple[str, Union[str, unicode]]]: ...
class LookupDict(dict):
name = ... # type: Any

View File

@@ -17,6 +17,8 @@ from . import utils
from . import compat
from . import status_codes
from typing import Optional, Union
default_hooks = hooks.default_hooks
CaseInsensitiveDict = structures.CaseInsensitiveDict
HTTPBasicAuth = auth.HTTPBasicAuth
@@ -78,10 +80,10 @@ class Request(RequestHooksMixin):
def prepare(self): ...
class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
method = ... # type: str
url = ... # type: str
headers = ... # type: Dict[str, str]
body = ... # type: str
method = ... # type: Optional[str]
url = ... # type: Optional[str]
headers = ... # type: CaseInsensitiveDict
body = ... # type: Optional[Union[str, bytes]]
hooks = ... # type: Any
def __init__(self) -> None: ...
def prepare(self, method=..., url=..., headers=..., files=..., data=..., params=...,

View File

@@ -1,18 +1,9 @@
# Stubs for requests.structures (Python 3)
from typing import Any
import collections
from typing import Any, Iterator, MutableMapping, Tuple, Union
class CaseInsensitiveDict(collections.MutableMapping):
def __init__(self, data=..., **kwargs) -> None: ...
def __setitem__(self, key, value): ...
def __getitem__(self, key): ...
def __delitem__(self, key): ...
def __iter__(self): ...
def __len__(self): ...
def lower_items(self): ...
def __eq__(self, other): ...
def copy(self): ...
class CaseInsensitiveDict(MutableMapping[str, Union[str, bytes]]):
def lower_items(self) -> Iterator[Tuple[str, Union[str, bytes]]]: ...
class LookupDict(dict):
name = ... # type: Any