Skip to content

Commit cba51d4

Browse files
committed
Add ruff format check. Fix format warnings
1 parent e46d5b7 commit cba51d4

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/ruff.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
name: Ruff
22
on: [ push, pull_request ]
33
jobs:
4-
ruff:
4+
ruff-check:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v4
8-
- uses: astral-sh/ruff-action@v1
8+
- uses: astral-sh/ruff-action@v1
9+
10+
ruff-format:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: astral-sh/ruff-action@v1
15+
with:
16+
args: "format --check --diff"

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ ignore = ["ANN401"]
6464
fixable = ["ALL"]
6565
unfixable = []
6666

67+
[tool.ruff.lint.isort] # Prevent ruff from reporting conflicting settings with isort
68+
split-on-trailing-comma = false
69+
6770
[tool.ruff.lint.per-file-ignores]
6871
"tests/*" = ["D100", "D103", "D104"]
6972
"examples/*" = ["D100", "D103"]

0 commit comments

Comments
 (0)