mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 08:17:07 +08:00
Remove custom _Text type (#3211)
* Remove custom _Text type Since the custom type was only used in argument types, it was effectively only an alias for typing.Text. * Run requests/api.pyi through black
This commit is contained in:
committed by
Jelle Zijlstra
parent
d78747c0f0
commit
ae881faaf1
54
third_party/2and3/requests/api.pyi
vendored
54
third_party/2and3/requests/api.pyi
vendored
@@ -5,36 +5,28 @@ from typing import Optional, Union, Any, Iterable, Mapping, MutableMapping, Tupl
|
||||
|
||||
from .models import Response
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
_Text = str
|
||||
else:
|
||||
_Text = Union[str, Text]
|
||||
|
||||
_ParamsMappingValueType = Union[_Text, bytes, int, float, Iterable[Union[_Text, bytes, int, float]]]
|
||||
_Data = Union[
|
||||
None,
|
||||
_Text,
|
||||
bytes,
|
||||
MutableMapping[str, Any],
|
||||
MutableMapping[Text, Any],
|
||||
Iterable[Tuple[_Text, Optional[_Text]]],
|
||||
IO
|
||||
]
|
||||
_ParamsMappingValueType = Union[Text, bytes, int, float, Iterable[Union[Text, bytes, int, float]]]
|
||||
_Data = Union[None, Text, bytes, MutableMapping[str, Any], MutableMapping[Text, Any], Iterable[Tuple[Text, Optional[Text]]], IO]
|
||||
|
||||
def request(method: str, url: str, **kwargs) -> Response: ...
|
||||
def get(url: Union[_Text, bytes],
|
||||
params: Optional[
|
||||
Union[Mapping[Union[_Text, bytes, int, float], _ParamsMappingValueType],
|
||||
Union[_Text, bytes],
|
||||
Tuple[Union[_Text, bytes, int, float], _ParamsMappingValueType],
|
||||
Mapping[_Text, _ParamsMappingValueType],
|
||||
Mapping[bytes, _ParamsMappingValueType],
|
||||
Mapping[int, _ParamsMappingValueType],
|
||||
Mapping[float, _ParamsMappingValueType]]] = ...,
|
||||
**kwargs) -> Response: ...
|
||||
def options(url: Union[_Text, bytes], **kwargs) -> Response: ...
|
||||
def head(url: Union[_Text, bytes], **kwargs) -> Response: ...
|
||||
def post(url: Union[_Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def put(url: Union[_Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def patch(url: Union[_Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def delete(url: Union[_Text, bytes], **kwargs) -> Response: ...
|
||||
def get(
|
||||
url: Union[Text, bytes],
|
||||
params: Optional[
|
||||
Union[
|
||||
Mapping[Union[Text, bytes, int, float], _ParamsMappingValueType],
|
||||
Union[Text, bytes],
|
||||
Tuple[Union[Text, bytes, int, float], _ParamsMappingValueType],
|
||||
Mapping[Text, _ParamsMappingValueType],
|
||||
Mapping[bytes, _ParamsMappingValueType],
|
||||
Mapping[int, _ParamsMappingValueType],
|
||||
Mapping[float, _ParamsMappingValueType],
|
||||
]
|
||||
] = ...,
|
||||
**kwargs,
|
||||
) -> Response: ...
|
||||
def options(url: Union[Text, bytes], **kwargs) -> Response: ...
|
||||
def head(url: Union[Text, bytes], **kwargs) -> Response: ...
|
||||
def post(url: Union[Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def put(url: Union[Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def patch(url: Union[Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def delete(url: Union[Text, bytes], **kwargs) -> Response: ...
|
||||
|
||||
Reference in New Issue
Block a user