Remove or move several TypeAlias declarations (#8444)

This commit is contained in:
Alex Waygood
2022-07-30 15:28:52 +01:00
committed by GitHub
parent 275fc28733
commit fdeb216547
15 changed files with 46 additions and 55 deletions
+5 -13
View File
@@ -1,19 +1,11 @@
from collections.abc import Mapping
from typing import Any
from typing_extensions import TypeAlias
from .models import Response
from .sessions import (
RequestsCookieJar,
_Auth,
_Cert,
_Data,
_Files,
_HeadersMapping,
_HooksInput,
_Params,
_TextMapping,
_Timeout,
_Verify,
)
from .sessions import RequestsCookieJar, _Auth, _Cert, _Data, _Files, _HooksInput, _Params, _TextMapping, _Timeout, _Verify
_HeadersMapping: TypeAlias = Mapping[str, str | bytes]
def request(
method: str | bytes,
-1
View File
@@ -70,7 +70,6 @@ _Params: TypeAlias = Union[
str | bytes,
]
_TextMapping: TypeAlias = MutableMapping[str, str]
_HeadersMapping: TypeAlias = Mapping[str, str | bytes]
_HeadersUpdateMapping: TypeAlias = Mapping[str, str | bytes | None]
_Timeout: TypeAlias = Union[float, tuple[float, float], tuple[float, None]]
_Verify: TypeAlias = bool | str