Update annotations for requests.api (#844)

Argument params of requests.api.get accepts not only dictionaries of str, str pairs, but dictionaries and tuples of various types.
This commit is contained in:
Alexey
2017-01-18 22:32:18 +03:00
committed by Łukasz Langa
parent 6339f88ae4
commit 2195b9d297

View File

@@ -1,15 +1,16 @@
# Stubs for requests.api (Python 3)
# Stubs for requests.api (Python 2)
from typing import Union, Optional, AnyStr
from typing import Union, Optional, Iterable, Dict, Tuple
from .models import Response
def request(method: str, url: str, **kwargs) -> Response: ...
def get(url: Union[str, unicode],
params: Optional[Union[dict[Union[str, unicode],
Union[str, unicode]],
Union[str, unicode]]]=None,
params: Optional[
Union[Dict[Union[str, unicode, int, float], Union[str, unicode, int, float, Iterable[Union[str, unicode, int, float]]]],
Union[str, unicode],
Tuple[Union[str, unicode, int, float], Union[str, unicode, int, float, Iterable[Union[str, unicode, int, float]]]]]] = None,
**kwargs) -> Response: ...
def options(url: Union[str, unicode], **kwargs) -> Response: ...