feat: add ruff check --fix to commit handler (lint + format before staging)
This commit is contained in:
@@ -75,6 +75,12 @@ def commit_changes(
|
||||
if venv_ruff.exists():
|
||||
ruff_bin = str(venv_ruff)
|
||||
if ruff_bin:
|
||||
subprocess.run(
|
||||
[ruff_bin, "check", "--fix", "src/", "tests/"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
cwd=str(repo_root),
|
||||
)
|
||||
subprocess.run(
|
||||
[ruff_bin, "format", "src/", "tests/"],
|
||||
capture_output=True,
|
||||
|
||||
Reference in New Issue
Block a user