Added Iterable of tuples support (#4636)

This commit is contained in:
Kaushal Rohit
2020-10-15 00:59:31 +05:30
committed by GitHub
parent f35e79fd24
commit 83ffaa6ff5

View File

@@ -1,10 +1,12 @@
# Stubs for requests.api (Python 3)
from typing import Iterable, Mapping, Optional, Text, Tuple, Union
from _typeshed import SupportsItems
from typing import Iterable, Optional, Text, Tuple, Union
from .models import Response
from .sessions import _Data
_ParamsMappingKeyType = Union[Text, bytes, int, float]
_ParamsMappingValueType = Union[Text, bytes, int, float, Iterable[Union[Text, bytes, int, float]], None]
def request(method: str, url: str, **kwargs) -> Response: ...
@@ -12,13 +14,10 @@ def get(
url: Union[Text, bytes],
params: Optional[
Union[
Mapping[Union[Text, bytes, int, float], _ParamsMappingValueType],
SupportsItems[_ParamsMappingKeyType, _ParamsMappingValueType],
Tuple[_ParamsMappingKeyType, _ParamsMappingValueType],
Iterable[Tuple[_ParamsMappingKeyType, _ParamsMappingValueType]],
Union[Text, bytes],
Tuple[Union[Text, bytes, int, float], _ParamsMappingValueType],
Mapping[Text, _ParamsMappingValueType],
Mapping[bytes, _ParamsMappingValueType],
Mapping[int, _ParamsMappingValueType],
Mapping[float, _ParamsMappingValueType],
]
] = ...,
**kwargs,