Skip to content

Commit bbefe2f

Browse files
committed
tidy: clean up meaningless function
1 parent 4471383 commit bbefe2f

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

marimo/_ast/parse.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,9 @@ def node_stack(self) -> PeekStack[Node]:
525525
# File has syntax errors — use scanner to recover individual cells.
526526
# Never re-raise: parse_notebook must return a best-effort result
527527
# so --watch and IPC are never broken by a syntax error.
528-
nodes, scanner_lines = _scan_parse_fallback(
528+
from marimo._ast.scanner import scan_parse_fallback
529+
530+
nodes, scanner_lines = scan_parse_fallback(
529531
self.extractor.contents or "", self.filepath
530532
)
531533
self._scanner_generated_lines = scanner_lines
@@ -1160,15 +1162,6 @@ def parse_notebook(
11601162
)
11611163

11621164

1163-
def _scan_parse_fallback(
1164-
source: str, filepath: str
1165-
) -> tuple[list[ast.stmt], frozenset[int]]:
1166-
"""When ast.parse() fails, use scanner to recover individual cells."""
1167-
from marimo._ast.scanner import scan_parse_fallback
1168-
1169-
return scan_parse_fallback(source, filepath)
1170-
1171-
11721165
# Violation message constants
11731166
MARIMO_ALIAS_VIOLATION = "`marimo` is typically not imported with an alias. "
11741167
UNEXPECTED_STATEMENT_MARIMO_IMPORT_VIOLATION = (

0 commit comments

Comments
 (0)