Update annotations in requests.api for Python 3 (#849)

* Update annotations for requests.api.get

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-20 01:09:58 +03:00
committed by Łukasz Langa
parent b96bd698ab
commit 741dd37422

View File

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