A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: leading whitespace (#4774)
Dylan Madisetti792046ca721b
diff --git a/marimo/_ast/codegen.py b/marimo/_ast/codegen.pyindex a66245e02f..85caedea0f 100644--- a/marimo/_ast/codegen.py+++ b/marimo/_ast/codegen.py@@ -395,7 +395,7 @@ def generate_filecontents("",])- return "\n".join(filecontents)+ return "\n".join(filecontents).lstrip()def recover(filename: str) -> str:diff --git a/tests/_ast/test_codegen.py b/tests/_ast/test_codegen.pyindex aac8ec5c18..7f5e362539 100644--- a/tests/_ast/test_codegen.py+++ b/tests/_ast/test_codegen.py@@ -62,9 +62,12 @@ def wrap_generate_filecontents(resolved_configs = [CellConfig() for _ in range(len(codes))]else:resolved_configs = cell_configs- return codegen.generate_filecontents(+ filecontents = codegen.generate_filecontents(codes, names, cell_configs=resolved_configs, **kwargs)+ # leading spaces should be removed too+ assert filecontents.lstrip() == filecontents+ return filecontentsdef get_idempotent_marimo_source(name: str) -> str: