|
10 | 10 |
|
11 | 11 | from .devbox import Devbox |
12 | 12 | from .._types import Body, Omit, Query, Headers, Timeout, NotGiven, omit, not_given |
13 | | -from .._client import Runloop |
| 13 | +from .._client import Runloop, DEFAULT_MAX_RETRIES |
14 | 14 | from ._helpers import ContentType, detect_content_type |
15 | 15 | from .snapshot import Snapshot |
16 | 16 | from .blueprint import Blueprint |
@@ -431,30 +431,20 @@ def __init__( |
431 | 431 | bearer_token: str | None = None, |
432 | 432 | base_url: str | httpx.URL | None = None, |
433 | 433 | timeout: float | Timeout | None | NotGiven = not_given, |
434 | | - max_retries: int | None = None, |
| 434 | + max_retries: int = DEFAULT_MAX_RETRIES, |
435 | 435 | default_headers: Mapping[str, str] | None = None, |
436 | 436 | default_query: Mapping[str, object] | None = None, |
437 | 437 | http_client: httpx.Client | None = None, |
438 | 438 | ) -> None: |
439 | | - if max_retries is None: |
440 | | - self.api = Runloop( |
441 | | - bearer_token=bearer_token, |
442 | | - base_url=base_url, |
443 | | - timeout=timeout, |
444 | | - default_headers=default_headers, |
445 | | - default_query=default_query, |
446 | | - http_client=http_client, |
447 | | - ) |
448 | | - else: |
449 | | - self.api = Runloop( |
450 | | - bearer_token=bearer_token, |
451 | | - base_url=base_url, |
452 | | - timeout=timeout, |
453 | | - max_retries=max_retries, |
454 | | - default_headers=default_headers, |
455 | | - default_query=default_query, |
456 | | - http_client=http_client, |
457 | | - ) |
| 439 | + self.api = Runloop( |
| 440 | + bearer_token=bearer_token, |
| 441 | + base_url=base_url, |
| 442 | + timeout=timeout, |
| 443 | + max_retries=max_retries, |
| 444 | + default_headers=default_headers, |
| 445 | + default_query=default_query, |
| 446 | + http_client=http_client, |
| 447 | + ) |
458 | 448 |
|
459 | 449 | self.devbox = DevboxClient(self.api) |
460 | 450 | self.blueprint = BlueprintClient(self.api) |
|
0 commit comments