Skip to content

Commit b1e266e

Browse files
committed
Hoist imports
1 parent 937801c commit b1e266e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

marimo/_code_mode/_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@
3636
UpdateUIElementCommand,
3737
)
3838
from marimo._runtime.context import get_context as _get_runtime_context
39+
from marimo._runtime.context.kernel_context import KernelRuntimeContext
3940
from marimo._runtime.runtime import CellMetadata
4041
from marimo._types.ids import CellId_t, UIElementId
42+
from marimo._utils.formatter import DefaultFormatter
4143

4244
if TYPE_CHECKING:
4345
from marimo._runtime.dataflow import DirectedGraph
@@ -50,7 +52,6 @@ def get_context() -> AsyncCodeModeContext:
5052
Must be called from within a running marimo kernel (e.g., scratchpad).
5153
Make sure to ``await`` all cell operations on the returned context.
5254
"""
53-
from marimo._runtime.context.kernel_context import KernelRuntimeContext
5455

5556
runtime_ctx = _get_runtime_context()
5657
if not isinstance(runtime_ctx, KernelRuntimeContext):
@@ -294,7 +295,6 @@ async def apply_edit(self, edits: Edit | Sequence[Edit]) -> None:
294295

295296
async def _format_plan(self, plan: list[_PlanEntry]) -> list[_PlanEntry]:
296297
"""Format new/changed code in the plan with the default formatter."""
297-
from marimo._utils.formatter import DefaultFormatter
298298

299299
existing_code = {
300300
cid: self.graph.cells[cid].code for cid in self.graph.cells

0 commit comments

Comments
 (0)