-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #218 from DimitriPapadopoulos/ruff_toml
Enforce ruff rules
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Python linting | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/ruff-action@v3 | ||
- name: Lint with Ruff | ||
run: ruff check --output-format=github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[lint] | ||
extend-select = [ | ||
"W", # pycodestyle (Warning) | ||
"I", # isort | ||
"UP", # pyupgrade | ||
"B", # flake8-bugbear | ||
"C4", # flake8-comprehensions | ||
"ISC", # flake8-implicit-str-concat | ||
"G", # flake8-logging-format | ||
"PIE", # flake8-pie | ||
"PYI", # flake8-pyi | ||
"PERF", # Perflint | ||
"FURB", # refurb | ||
"RUF", | ||
] | ||
ignore = [ | ||
"UP015", # Unnecessary open mode parameters | ||
"UP031", # Use format specifiers instead of percent format | ||
"B903", | ||
"B904", | ||
"C408", # Unnecessary `list()`/`dict()` call (rewrite as a literal) | ||
"G002", # Logging statement uses `%` | ||
"G010", # Logging statement uses `warn` instead of `warning` | ||
"FURB154", # Use of repeated consecutive `global` | ||
"RUF031", # Avoid parentheses for tuples in subscripts | ||
] |