mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-22 09:38:50 +08:00
Enable flake8-pyi's Y037 (#9686)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete, Self, SupportsItems, SupportsRead
|
||||
from collections.abc import Callable, Iterable, Mapping, MutableMapping
|
||||
from typing import Any, Union
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias, TypedDict
|
||||
|
||||
from urllib3._collections import RecentlyUsedContainer
|
||||
@@ -77,8 +77,8 @@ _Data: TypeAlias = (
|
||||
| tuple[tuple[Any, Any], ...]
|
||||
| Mapping[Any, Any]
|
||||
)
|
||||
_Auth: TypeAlias = Union[tuple[str, str], _auth.AuthBase, Callable[[PreparedRequest], PreparedRequest]]
|
||||
_Cert: TypeAlias = Union[str, tuple[str, str]]
|
||||
_Auth: TypeAlias = tuple[str, str] | _auth.AuthBase | Callable[[PreparedRequest], PreparedRequest]
|
||||
_Cert: TypeAlias = str | tuple[str, str]
|
||||
# Files is passed to requests.utils.to_key_val_list()
|
||||
_FileName: TypeAlias = str | None
|
||||
_FileContent: TypeAlias = SupportsRead[str | bytes] | str | bytes
|
||||
@@ -94,15 +94,16 @@ _HooksInput: TypeAlias = Mapping[str, Iterable[_Hook] | _Hook]
|
||||
|
||||
_ParamsMappingKeyType: TypeAlias = str | bytes | int | float
|
||||
_ParamsMappingValueType: TypeAlias = str | bytes | int | float | Iterable[str | bytes | int | float] | None
|
||||
_Params: TypeAlias = Union[
|
||||
SupportsItems[_ParamsMappingKeyType, _ParamsMappingValueType],
|
||||
tuple[_ParamsMappingKeyType, _ParamsMappingValueType],
|
||||
Iterable[tuple[_ParamsMappingKeyType, _ParamsMappingValueType]],
|
||||
str | bytes,
|
||||
]
|
||||
_Params: TypeAlias = (
|
||||
SupportsItems[_ParamsMappingKeyType, _ParamsMappingValueType]
|
||||
| tuple[_ParamsMappingKeyType, _ParamsMappingValueType]
|
||||
| Iterable[tuple[_ParamsMappingKeyType, _ParamsMappingValueType]]
|
||||
| str
|
||||
| bytes
|
||||
)
|
||||
_TextMapping: TypeAlias = MutableMapping[str, str]
|
||||
_HeadersUpdateMapping: TypeAlias = Mapping[str, str | bytes | None]
|
||||
_Timeout: TypeAlias = Union[float, tuple[float, float], tuple[float, None]]
|
||||
_Timeout: TypeAlias = float | tuple[float, float] | tuple[float, None]
|
||||
_Verify: TypeAlias = bool | str
|
||||
|
||||
class _Settings(TypedDict):
|
||||
|
||||
Reference in New Issue
Block a user