From 2195b9d297b8032cb8296d39933240c265e8c36b Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 18 Jan 2017 22:32:18 +0300 Subject: [PATCH] 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. --- third_party/2/requests/api.pyi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/third_party/2/requests/api.pyi b/third_party/2/requests/api.pyi index 785439e00..6472b6973 100644 --- a/third_party/2/requests/api.pyi +++ b/third_party/2/requests/api.pyi @@ -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: ...