|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | 5 | import os |
6 | | -from typing import TYPE_CHECKING, Any, Dict, Union, Mapping, cast |
| 6 | +from typing import TYPE_CHECKING, Any, Dict, Mapping, cast |
7 | 7 | from typing_extensions import Self, Literal, override |
8 | 8 |
|
9 | 9 | import httpx |
10 | 10 |
|
11 | 11 | from . import _exceptions, _legacy_response |
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 ._compat import cached_property |
@@ -127,9 +127,9 @@ def __init__( |
127 | 127 | *, |
128 | 128 | api_key: str | None = None, |
129 | 129 | webhook_secret: str | None = None, |
130 | | - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, |
131 | | - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, |
132 | | - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, |
| 130 | + environment: Literal["production", "sandbox"] | NotGiven = not_given, |
| 131 | + base_url: str | httpx.URL | None | NotGiven = not_given, |
| 132 | + timeout: float | Timeout | None | NotGiven = not_given, |
133 | 133 | max_retries: int = DEFAULT_MAX_RETRIES, |
134 | 134 | default_headers: Mapping[str, str] | None = None, |
135 | 135 | default_query: Mapping[str, object] | None = None, |
@@ -412,9 +412,9 @@ def copy( |
412 | 412 | webhook_secret: str | None = None, |
413 | 413 | environment: Literal["production", "sandbox"] | None = None, |
414 | 414 | base_url: str | httpx.URL | None = None, |
415 | | - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 415 | + timeout: float | Timeout | None | NotGiven = not_given, |
416 | 416 | http_client: httpx.Client | None = None, |
417 | | - max_retries: int | NotGiven = NOT_GIVEN, |
| 417 | + max_retries: int | NotGiven = not_given, |
418 | 418 | default_headers: Mapping[str, str] | None = None, |
419 | 419 | set_default_headers: Mapping[str, str] | None = None, |
420 | 420 | default_query: Mapping[str, object] | None = None, |
@@ -468,7 +468,7 @@ def api_status( |
468 | 468 | extra_headers: Headers | None = None, |
469 | 469 | extra_query: Query | None = None, |
470 | 470 | extra_body: Body | None = None, |
471 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 471 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
472 | 472 | ) -> APIStatus: |
473 | 473 | """Status of api""" |
474 | 474 | return self.get( |
@@ -525,9 +525,9 @@ def __init__( |
525 | 525 | *, |
526 | 526 | api_key: str | None = None, |
527 | 527 | webhook_secret: str | None = None, |
528 | | - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, |
529 | | - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, |
530 | | - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, |
| 528 | + environment: Literal["production", "sandbox"] | NotGiven = not_given, |
| 529 | + base_url: str | httpx.URL | None | NotGiven = not_given, |
| 530 | + timeout: float | Timeout | None | NotGiven = not_given, |
531 | 531 | max_retries: int = DEFAULT_MAX_RETRIES, |
532 | 532 | default_headers: Mapping[str, str] | None = None, |
533 | 533 | default_query: Mapping[str, object] | None = None, |
@@ -810,9 +810,9 @@ def copy( |
810 | 810 | webhook_secret: str | None = None, |
811 | 811 | environment: Literal["production", "sandbox"] | None = None, |
812 | 812 | base_url: str | httpx.URL | None = None, |
813 | | - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 813 | + timeout: float | Timeout | None | NotGiven = not_given, |
814 | 814 | http_client: httpx.AsyncClient | None = None, |
815 | | - max_retries: int | NotGiven = NOT_GIVEN, |
| 815 | + max_retries: int | NotGiven = not_given, |
816 | 816 | default_headers: Mapping[str, str] | None = None, |
817 | 817 | set_default_headers: Mapping[str, str] | None = None, |
818 | 818 | default_query: Mapping[str, object] | None = None, |
@@ -866,7 +866,7 @@ async def api_status( |
866 | 866 | extra_headers: Headers | None = None, |
867 | 867 | extra_query: Query | None = None, |
868 | 868 | extra_body: Body | None = None, |
869 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 869 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
870 | 870 | ) -> APIStatus: |
871 | 871 | """Status of api""" |
872 | 872 | return await self.get( |
|
0 commit comments