|
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 | Body, |
16 | 15 | Omit, |
17 | 16 | Query, |
|
21 | 20 | Transport, |
22 | 21 | ProxiesTypes, |
23 | 22 | RequestOptions, |
| 23 | + not_given, |
24 | 24 | ) |
25 | 25 | from ._utils import is_given, get_async_library |
26 | 26 | from ._version import __version__ |
@@ -68,7 +68,7 @@ def __init__( |
68 | 68 | *, |
69 | 69 | api_key: str | None = None, |
70 | 70 | base_url: str | httpx.URL | None = None, |
71 | | - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, |
| 71 | + timeout: float | Timeout | None | NotGiven = not_given, |
72 | 72 | max_retries: int = DEFAULT_MAX_RETRIES, |
73 | 73 | default_headers: Mapping[str, str] | None = None, |
74 | 74 | default_query: Mapping[str, object] | None = None, |
@@ -146,9 +146,9 @@ def copy( |
146 | 146 | *, |
147 | 147 | api_key: str | None = None, |
148 | 148 | base_url: str | httpx.URL | None = None, |
149 | | - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 149 | + timeout: float | Timeout | None | NotGiven = not_given, |
150 | 150 | http_client: httpx.Client | None = None, |
151 | | - max_retries: int | NotGiven = NOT_GIVEN, |
| 151 | + max_retries: int | NotGiven = not_given, |
152 | 152 | default_headers: Mapping[str, str] | None = None, |
153 | 153 | set_default_headers: Mapping[str, str] | None = None, |
154 | 154 | default_query: Mapping[str, object] | None = None, |
@@ -200,7 +200,7 @@ def retrieve( |
200 | 200 | extra_headers: Headers | None = None, |
201 | 201 | extra_query: Query | None = None, |
202 | 202 | extra_body: Body | None = None, |
203 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 203 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
204 | 204 | ) -> object: |
205 | 205 | """Root""" |
206 | 206 | return self.get( |
@@ -261,7 +261,7 @@ def __init__( |
261 | 261 | *, |
262 | 262 | api_key: str | None = None, |
263 | 263 | base_url: str | httpx.URL | None = None, |
264 | | - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, |
| 264 | + timeout: float | Timeout | None | NotGiven = not_given, |
265 | 265 | max_retries: int = DEFAULT_MAX_RETRIES, |
266 | 266 | default_headers: Mapping[str, str] | None = None, |
267 | 267 | default_query: Mapping[str, object] | None = None, |
@@ -339,9 +339,9 @@ def copy( |
339 | 339 | *, |
340 | 340 | api_key: str | None = None, |
341 | 341 | base_url: str | httpx.URL | None = None, |
342 | | - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 342 | + timeout: float | Timeout | None | NotGiven = not_given, |
343 | 343 | http_client: httpx.AsyncClient | None = None, |
344 | | - max_retries: int | NotGiven = NOT_GIVEN, |
| 344 | + max_retries: int | NotGiven = not_given, |
345 | 345 | default_headers: Mapping[str, str] | None = None, |
346 | 346 | set_default_headers: Mapping[str, str] | None = None, |
347 | 347 | default_query: Mapping[str, object] | None = None, |
@@ -393,7 +393,7 @@ async def retrieve( |
393 | 393 | extra_headers: Headers | None = None, |
394 | 394 | extra_query: Query | None = None, |
395 | 395 | extra_body: Body | None = None, |
396 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 396 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
397 | 397 | ) -> object: |
398 | 398 | """Root""" |
399 | 399 | return await self.get( |
|
0 commit comments