Skip to content

Commit 0cf70bf

Browse files
committed
circular import fixes
1 parent 6157d7f commit 0cf70bf

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/runloop_api_client/sdk/blueprint.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from __future__ import annotations
22

3-
from typing import Dict, Iterable, Optional
3+
from typing import TYPE_CHECKING, Dict, Iterable, Optional
44
from typing_extensions import override
55

6-
from ._sync import DevboxClient
6+
if TYPE_CHECKING:
7+
from .devbox import Devbox
78
from ..types import BlueprintView
8-
from .devbox import Devbox
99
from .._types import NOT_GIVEN, Body, Query, Headers, Timeout, NotGiven, not_given
1010
from .._client import Runloop
1111
from ..lib.polling import PollingConfig
@@ -101,7 +101,9 @@ def create_devbox(
101101
extra_body: Body | None = None,
102102
timeout: float | Timeout | None | NotGiven = not_given,
103103
idempotency_key: str | None = None,
104-
) -> Devbox:
104+
) -> "Devbox":
105+
from ._sync import DevboxClient
106+
105107
devbox_client = DevboxClient(self._client)
106108
return devbox_client.create_from_blueprint_id(
107109
self._id,

src/runloop_api_client/sdk/snapshot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from typing import TYPE_CHECKING, Dict, Iterable, Optional
44
from typing_extensions import override
55

6-
from ._sync import DevboxClient
7-
86
if TYPE_CHECKING:
97
from .devbox import Devbox
108
from .._types import NOT_GIVEN, Body, Omit, Query, Headers, Timeout, NotGiven, omit, not_given
@@ -131,7 +129,9 @@ def create_devbox(
131129
extra_body: Body | None = None,
132130
timeout: float | Timeout | None | NotGiven = not_given,
133131
idempotency_key: str | None = None,
134-
) -> Devbox:
132+
) -> "Devbox":
133+
from ._sync import DevboxClient
134+
135135
devbox_client = DevboxClient(self._client)
136136
return devbox_client.create_from_snapshot(
137137
self._id,

0 commit comments

Comments
 (0)