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.

chore(ruff): require review for unsafe subprocess hooks (#10933)

Shahmir Varqha33ad08e05086
diff --git a/marimo/_utils/subprocess.py b/marimo/_utils/subprocess.py
index da5d41f5ef..e2c1acaf8a 100644
--- a/marimo/_utils/subprocess.py
+++ b/marimo/_utils/subprocess.py
@@ -255,7 +255,9 @@ def safe_popen(
stdin=stdin,
stdout=stdout,
stderr=stderr,
- preexec_fn=preexec_fn,
+ # Mirror Popen's signature for compatibility; current callers
+ # retain the safe default of None.
+ preexec_fn=preexec_fn, # noqa: PLW1509
close_fds=close_fds,
shell=shell,
cwd=cwd,
diff --git a/pyproject.toml b/pyproject.toml
index fad2486ea4..a4e74deb32 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -377,7 +377,6 @@ ignore = [
"UP007", # Use `X | Y` for type annotations
"DTZ012", # `date.fromtimestamp()` called without `tzinfo`
"DTZ901", # `datetime.min` / `datetime.max` used
- "PLW1509", # `subprocess` `preexec_fn` argument
"DTZ002", # `datetime.today()` called without tz
"D421", # Property docstring should not start with a verb (preview rule)