|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | 5 | import os |
6 | | -from typing import TYPE_CHECKING, Any, Union, Mapping |
| 6 | +from typing import TYPE_CHECKING, 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 | Headers, |
17 | 16 | Timeout, |
18 | 17 | NotGiven, |
19 | 18 | Transport, |
20 | 19 | ProxiesTypes, |
21 | 20 | RequestOptions, |
| 21 | + not_given, |
22 | 22 | ) |
23 | 23 | from ._utils import is_given, get_async_library |
24 | 24 | from ._compat import cached_property |
@@ -86,7 +86,7 @@ def __init__( |
86 | 86 | agent_endpoint: str | None = None, |
87 | 87 | inference_endpoint: str | None = None, |
88 | 88 | base_url: str | httpx.URL | None = None, |
89 | | - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, |
| 89 | + timeout: float | Timeout | None | NotGiven = not_given, |
90 | 90 | max_retries: int = DEFAULT_MAX_RETRIES, |
91 | 91 | default_headers: Mapping[str, str] | None = None, |
92 | 92 | default_query: Mapping[str, object] | None = None, |
@@ -273,9 +273,9 @@ def copy( |
273 | 273 | agent_endpoint: str | None = None, |
274 | 274 | inference_endpoint: str | None = None, |
275 | 275 | base_url: str | httpx.URL | None = None, |
276 | | - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 276 | + timeout: float | Timeout | None | NotGiven = not_given, |
277 | 277 | http_client: httpx.Client | None = None, |
278 | | - max_retries: int | NotGiven = NOT_GIVEN, |
| 278 | + max_retries: int | NotGiven = not_given, |
279 | 279 | default_headers: Mapping[str, str] | None = None, |
280 | 280 | set_default_headers: Mapping[str, str] | None = None, |
281 | 281 | default_query: Mapping[str, object] | None = None, |
@@ -392,7 +392,7 @@ def __init__( |
392 | 392 | agent_endpoint: str | None = None, |
393 | 393 | inference_endpoint: str | None = None, |
394 | 394 | base_url: str | httpx.URL | None = None, |
395 | | - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, |
| 395 | + timeout: float | Timeout | None | NotGiven = not_given, |
396 | 396 | max_retries: int = DEFAULT_MAX_RETRIES, |
397 | 397 | default_headers: Mapping[str, str] | None = None, |
398 | 398 | default_query: Mapping[str, object] | None = None, |
@@ -579,9 +579,9 @@ def copy( |
579 | 579 | agent_access_key: str | None = None, |
580 | 580 | inference_endpoint: str | None = None, |
581 | 581 | base_url: str | httpx.URL | None = None, |
582 | | - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 582 | + timeout: float | Timeout | None | NotGiven = not_given, |
583 | 583 | http_client: httpx.AsyncClient | None = None, |
584 | | - max_retries: int | NotGiven = NOT_GIVEN, |
| 584 | + max_retries: int | NotGiven = not_given, |
585 | 585 | default_headers: Mapping[str, str] | None = None, |
586 | 586 | set_default_headers: Mapping[str, str] | None = None, |
587 | 587 | default_query: Mapping[str, object] | None = None, |
|
0 commit comments