Skip to content

Commit 8233b0e

Browse files
fix(ci): run ruff --fix before format for convergence
ruff check --fix can rewrite imports; formatting last avoids leaving files unformatted after a single scripts/format or pre-commit run.
1 parent f3e1403 commit 8233b0e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
66
rev: v0.15.5
77
hooks:
8-
- id: ruff-format
98
- id: ruff
109
args: [--fix]
10+
- id: ruff-format

scripts/format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ if [ "${#targets[@]}" -eq 0 ]; then
1414
targets=(".")
1515
fi
1616

17-
ruff format "${targets[@]}"
1817
ruff check --fix "${targets[@]}"
18+
ruff format "${targets[@]}"

0 commit comments

Comments
 (0)