|
42 | 42 | from ._qs import Querystring
|
43 | 43 | from ._files import to_httpx_files, async_to_httpx_files
|
44 | 44 | from ._types import (
|
45 |
| - NOT_GIVEN, |
46 | 45 | Body,
|
47 | 46 | Omit,
|
48 | 47 | Query,
|
|
57 | 56 | RequestOptions,
|
58 | 57 | HttpxRequestFiles,
|
59 | 58 | ModelBuilderProtocol,
|
| 59 | + not_given, |
60 | 60 | )
|
61 | 61 | from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
|
62 | 62 | from ._compat import PYDANTIC_V1, model_copy, model_dump
|
@@ -145,9 +145,9 @@ def __init__(
|
145 | 145 | def __init__(
|
146 | 146 | self,
|
147 | 147 | *,
|
148 |
| - url: URL | NotGiven = NOT_GIVEN, |
149 |
| - json: Body | NotGiven = NOT_GIVEN, |
150 |
| - params: Query | NotGiven = NOT_GIVEN, |
| 148 | + url: URL | NotGiven = not_given, |
| 149 | + json: Body | NotGiven = not_given, |
| 150 | + params: Query | NotGiven = not_given, |
151 | 151 | ) -> None:
|
152 | 152 | self.url = url
|
153 | 153 | self.json = json
|
@@ -595,7 +595,7 @@ def _maybe_override_cast_to(self, cast_to: type[ResponseT], options: FinalReques
|
595 | 595 | # we internally support defining a temporary header to override the
|
596 | 596 | # default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
|
597 | 597 | # see _response.py for implementation details
|
598 |
| - override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN) |
| 598 | + override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given) |
599 | 599 | if is_given(override_cast_to):
|
600 | 600 | options.headers = headers
|
601 | 601 | return cast(Type[ResponseT], override_cast_to)
|
@@ -825,7 +825,7 @@ def __init__(
|
825 | 825 | version: str,
|
826 | 826 | base_url: str | URL,
|
827 | 827 | max_retries: int = DEFAULT_MAX_RETRIES,
|
828 |
| - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 828 | + timeout: float | Timeout | None | NotGiven = not_given, |
829 | 829 | http_client: httpx.Client | None = None,
|
830 | 830 | custom_headers: Mapping[str, str] | None = None,
|
831 | 831 | custom_query: Mapping[str, object] | None = None,
|
@@ -1356,7 +1356,7 @@ def __init__(
|
1356 | 1356 | base_url: str | URL,
|
1357 | 1357 | _strict_response_validation: bool,
|
1358 | 1358 | max_retries: int = DEFAULT_MAX_RETRIES,
|
1359 |
| - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 1359 | + timeout: float | Timeout | None | NotGiven = not_given, |
1360 | 1360 | http_client: httpx.AsyncClient | None = None,
|
1361 | 1361 | custom_headers: Mapping[str, str] | None = None,
|
1362 | 1362 | custom_query: Mapping[str, object] | None = None,
|
@@ -1818,8 +1818,8 @@ def make_request_options(
|
1818 | 1818 | extra_query: Query | None = None,
|
1819 | 1819 | extra_body: Body | None = None,
|
1820 | 1820 | idempotency_key: str | None = None,
|
1821 |
| - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
1822 |
| - post_parser: PostParser | NotGiven = NOT_GIVEN, |
| 1821 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
| 1822 | + post_parser: PostParser | NotGiven = not_given, |
1823 | 1823 | ) -> RequestOptions:
|
1824 | 1824 | """Create a dict of type RequestOptions without keys of NotGiven values."""
|
1825 | 1825 | options: RequestOptions = {}
|
|
0 commit comments