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.

fix: ignore blank line rules (E302, E305) (#8815)

Daizu1e0823296029
diff --git a/frontend/src/core/codemirror/language/languages/python.ts b/frontend/src/core/codemirror/language/languages/python.ts
index b8aa3372a0..203db92db8 100644
--- a/frontend/src/core/codemirror/language/languages/python.ts
+++ b/frontend/src/core/codemirror/language/languages/python.ts
@@ -69,6 +69,10 @@ const pylspClient = once((lspConfig: LSPConfig) => {
"W292", // No newline at end of file
// Modules can be imported in any cell
"E402", // Module level import not at top of file
+ // Blank line rules are not useful in marimo because cells are joined
+ // without extra blank lines, which can trigger these rules at cell boundaries
+ "E302", // Expected 2 blank lines, found 0
+ "E305", // Expected 2 blank lines after class or function definition, found 0
];
const ignoredRuffRules = [
// Even ruff documentation of this rule explains it is not useful in notebooks