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