Skip to content

Commit 2195b9d

Browse files
WouldYouKindlyambv
authored andcommitted
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.
1 parent 6339f88 commit 2195b9d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

third_party/2/requests/api.pyi

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# Stubs for requests.api (Python 3)
1+
# Stubs for requests.api (Python 2)
22

3-
from typing import Union, Optional, AnyStr
3+
from typing import Union, Optional, Iterable, Dict, Tuple
44

55
from .models import Response
66

77
def request(method: str, url: str, **kwargs) -> Response: ...
88

99
def get(url: Union[str, unicode],
10-
params: Optional[Union[dict[Union[str, unicode],
11-
Union[str, unicode]],
12-
Union[str, unicode]]]=None,
10+
params: Optional[
11+
Union[Dict[Union[str, unicode, int, float], Union[str, unicode, int, float, Iterable[Union[str, unicode, int, float]]]],
12+
Union[str, unicode],
13+
Tuple[Union[str, unicode, int, float], Union[str, unicode, int, float, Iterable[Union[str, unicode, int, float]]]]]] = None,
1314
**kwargs) -> Response: ...
1415

1516
def options(url: Union[str, unicode], **kwargs) -> Response: ...

0 commit comments

Comments
 (0)