mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
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:
11
third_party/2/requests/api.pyi
vendored
11
third_party/2/requests/api.pyi
vendored
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user