Skip to content

Commit 7654f86

Browse files
committed
clean up default value for max_retries
1 parent 598bcc8 commit 7654f86

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

src/runloop_api_client/sdk/sync.py

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from .devbox import Devbox
1212
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
1414
from ._helpers import ContentType, detect_content_type
1515
from .snapshot import Snapshot
1616
from .blueprint import Blueprint
@@ -431,30 +431,20 @@ def __init__(
431431
bearer_token: str | None = None,
432432
base_url: str | httpx.URL | None = None,
433433
timeout: float | Timeout | None | NotGiven = not_given,
434-
max_retries: int | None = None,
434+
max_retries: int = DEFAULT_MAX_RETRIES,
435435
default_headers: Mapping[str, str] | None = None,
436436
default_query: Mapping[str, object] | None = None,
437437
http_client: httpx.Client | None = None,
438438
) -> 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+
)
458448

459449
self.devbox = DevboxClient(self.api)
460450
self.blueprint = BlueprintClient(self.api)

0 commit comments

Comments
 (0)