From 741dd37422aa8fe6b17da8068e8bb3e1c2ac543b Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 20 Jan 2017 01:09:58 +0300 Subject: [PATCH] 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. --- third_party/3/requests/api.pyi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/third_party/3/requests/api.pyi b/third_party/3/requests/api.pyi index f5f1ec31d..90bf70256 100644 --- a/third_party/3/requests/api.pyi +++ b/third_party/3/requests/api.pyi @@ -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: ...