Skip to content

Commit 9cee4c7

Browse files
committed
Broaden runtime import guardrail detection.
Extend architecture checks to flag both from-import and import-as submodule patterns so marimo stays on the runtime root contract surface.
1 parent 155f587 commit 9cee4c7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_architecture_guardrails.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010

1111
def test_source_uses_hotdata_runtime_root_imports() -> None:
1212
violations: list[str] = []
13-
pattern = re.compile(r"(?m)^\s*from\s+hotdata_runtime\.(client|env|result|health)\s+import")
13+
pattern = re.compile(
14+
r"(?m)^\s*(?:from\s+hotdata_runtime\.(client|env|result|health)\s+import"
15+
r"|import\s+hotdata_runtime\.(client|env|result|health)(?:\s|$|,|as))"
16+
)
1417

1518
for path in SOURCE_ROOT.rglob("*.py"):
1619
text = path.read_text(encoding="utf-8")

0 commit comments

Comments
 (0)