Skip to content

Commit ba6639f

Browse files
committed
add ruff.toml
1 parent 614f4a4 commit ba6639f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: chartboost/ruff-action@v1
2424
with:
2525
version: 0.3.5
26-
args: 'format --check'
26+
args: 'format --check --config ./pyproject.toml'
2727

2828
ruff-isort:
2929
needs: [ ]
@@ -33,7 +33,7 @@ jobs:
3333
- uses: chartboost/ruff-action@v1
3434
with:
3535
version: 0.3.5
36-
args: '--select I'
36+
args: '--select I --config ./pyproject.toml'
3737

3838
ruff:
3939
needs: []
@@ -43,6 +43,7 @@ jobs:
4343
- uses: chartboost/ruff-action@v1
4444
with:
4545
version: 0.3.5
46+
args: '--config ./pyproject.toml'
4647
# Only run ruff on changed files
4748
changed-files: 'true'
4849

ruff.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[tool.ruff.lint]
2+
3+
# Enable default rules plus S101 (check for asserts).
4+
select = ["E4", "E7", "E9", "F", "S101"]
5+
6+
[tool.ruff.lint.per-file-ignores]
7+
# Ignore import violations in all init files.
8+
"__init__.py" = ["E402"]
9+
# Ignore assert checks in all test files.
10+
"**/*test*.py" = ["S101"]

0 commit comments

Comments
 (0)