Skip to content

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.

974 B
Raw Blame

MF007: markdown-indentation

✨ Formatting 🛠️ Fixable

MF007: Markdown strings in mo.md() should be properly indented.

What it does

Checks cells containing mo.md() calls to see if the markdown string content has unnecessary leading whitespace that should be removed.

Why is this bad?

Indented markdown strings:

  • Are harder to read when viewing the source code
  • Produce larger diffs when making changes
  • Don't match the standard marimo formatting style
  • Can be confusing when the indentation doesn't reflect the markdown structure

Examples

Problematic:

mo.md(
    r"""
    # Title

    Some content here.
    """
)

Solution:

mo.md(r"""
# Title

Some content here.
""")

Note: This fix is automatically applied with marimo check --fix.

References