Skip to content

Commit

Permalink
add ruff.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
ploeber committed Sep 4, 2024
1 parent 614f4a4 commit 5cbc367
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: chartboost/ruff-action@v1
with:
version: 0.3.5
args: 'format --check'
args: 'format --check --config ./ruff.toml'

ruff-isort:
needs: [ ]
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: chartboost/ruff-action@v1
with:
version: 0.3.5
args: '--select I'
args: '--select I --config ./ruff.toml'

ruff:
needs: []
Expand All @@ -43,6 +43,7 @@ jobs:
- uses: chartboost/ruff-action@v1
with:
version: 0.3.5
args: '--config ./ruff.toml'
# Only run ruff on changed files
changed-files: 'true'

Expand Down
10 changes: 10 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[lint]

# Enable default rules plus S101 (check for asserts).
select = ["E4", "E7", "E9", "F", "S101"]

[lint.per-file-ignores]
# Ignore import violations in all init files.
"__init__.py" = ["E402"]
# Ignore assert checks in all test files.
"**/*test*.py" = ["S101"]

0 comments on commit 5cbc367

Please sign in to comment.