-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade linting tools and switch to using ruff for linting and format…
…ting
- Loading branch information
Showing
5 changed files
with
63 additions
and
53 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,21 @@ | ||
name: Ruff | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'stable/**' | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: python -Im pip install --user ruff | ||
|
||
- name: Run ruff | ||
run: ruff --output-format=github wagtail_footnotes |
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
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
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,32 @@ | ||
[lint] | ||
extend-select = [ | ||
"B", # flake8-bugbear | ||
"C4", # flake8-comprehensions | ||
"DJ", # flake8-django | ||
"E", # pycodestyle errors | ||
"F", # pyflakes | ||
"FBT", # flake8-boolean-trap | ||
"I", # isort | ||
"INT", # flake8-gettext | ||
"PIE", # flake8-pie | ||
"PGH", # pygrep-hooks | ||
"S", # flake8-bandit | ||
"SIM", # flake8-simplify | ||
"W", # pycodestyle warnings | ||
"YTT", # flake8-2020 | ||
"UP", # pyupgrade | ||
"RUF100", # unused noqa | ||
] | ||
|
||
extend-ignore = [ | ||
"E501", # no line length errors | ||
] | ||
fixable = ["C4", "E", "F", "I", "UP"] | ||
|
||
[lint.isort] | ||
known-first-party = ["wagtail_footnotes"] | ||
lines-between-types = 1 | ||
lines-after-imports = 2 | ||
|
||
[format] | ||
docstring-code-format = true |
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