File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
11731166MARIMO_ALIAS_VIOLATION = "`marimo` is typically not imported with an alias. "
11741167UNEXPECTED_STATEMENT_MARIMO_IMPORT_VIOLATION = (
You can’t perform that action at this time.
0 commit comments