|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | 5 | import os |
6 | | -from typing import Any, Union, Mapping |
| 6 | +from typing import Any, Mapping |
7 | 7 | from typing_extensions import Self, override |
8 | 8 |
|
9 | 9 | import httpx |
10 | 10 |
|
11 | 11 | from . import _exceptions |
12 | 12 | from ._qs import Querystring |
13 | 13 | from ._types import ( |
14 | | - NOT_GIVEN, |
15 | 14 | Omit, |
16 | 15 | Timeout, |
17 | 16 | NotGiven, |
18 | 17 | Transport, |
19 | 18 | ProxiesTypes, |
20 | 19 | RequestOptions, |
| 20 | + not_given, |
21 | 21 | ) |
22 | 22 | from ._utils import is_given, get_async_library |
23 | 23 | from ._version import __version__ |
@@ -47,7 +47,7 @@ def __init__( |
47 | 47 | *, |
48 | 48 | socket_path: str | None = None, |
49 | 49 | base_url: str | httpx.URL | None = None, |
50 | | - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, |
| 50 | + timeout: float | Timeout | None | NotGiven = not_given, |
51 | 51 | max_retries: int = DEFAULT_MAX_RETRIES, |
52 | 52 | default_headers: Mapping[str, str] | None = None, |
53 | 53 | default_query: Mapping[str, object] | None = None, |
@@ -114,9 +114,9 @@ def copy( |
114 | 114 | *, |
115 | 115 | socket_path: str | None = None, |
116 | 116 | base_url: str | httpx.URL | None = None, |
117 | | - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 117 | + timeout: float | Timeout | None | NotGiven = not_given, |
118 | 118 | http_client: httpx.Client | None = None, |
119 | | - max_retries: int | NotGiven = NOT_GIVEN, |
| 119 | + max_retries: int | NotGiven = not_given, |
120 | 120 | default_headers: Mapping[str, str] | None = None, |
121 | 121 | set_default_headers: Mapping[str, str] | None = None, |
122 | 122 | default_query: Mapping[str, object] | None = None, |
@@ -208,7 +208,7 @@ def __init__( |
208 | 208 | *, |
209 | 209 | socket_path: str | None = None, |
210 | 210 | base_url: str | httpx.URL | None = None, |
211 | | - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, |
| 211 | + timeout: float | Timeout | None | NotGiven = not_given, |
212 | 212 | max_retries: int = DEFAULT_MAX_RETRIES, |
213 | 213 | default_headers: Mapping[str, str] | None = None, |
214 | 214 | default_query: Mapping[str, object] | None = None, |
@@ -275,9 +275,9 @@ def copy( |
275 | 275 | *, |
276 | 276 | socket_path: str | None = None, |
277 | 277 | base_url: str | httpx.URL | None = None, |
278 | | - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 278 | + timeout: float | Timeout | None | NotGiven = not_given, |
279 | 279 | http_client: httpx.AsyncClient | None = None, |
280 | | - max_retries: int | NotGiven = NOT_GIVEN, |
| 280 | + max_retries: int | NotGiven = not_given, |
281 | 281 | default_headers: Mapping[str, str] | None = None, |
282 | 282 | set_default_headers: Mapping[str, str] | None = None, |
283 | 283 | default_query: Mapping[str, object] | None = None, |
|
0 commit comments