ruff: configure
Newer versions of ruff support more linters and autoformatting, let's configure those to do the same as our current linter selection.
This commit is contained in:
parent
7fc06acffc
commit
a779d3268d
1 changed files with 26 additions and 3 deletions
29
.ruff.toml
29
.ruff.toml
|
|
@ -1,6 +1,29 @@
|
|||
line-length = 120
|
||||
|
||||
lint.ignore = [
|
||||
"E741", # ambiguous variable names
|
||||
"E501", # line too long
|
||||
[lint]
|
||||
# enabled the `isort` and `pylint` additional linters, see `ruff linter` output
|
||||
# or: https://docs.astral.sh/ruff/rules/
|
||||
extend-select = ["I", "PL"]
|
||||
|
||||
# all of these ignores and their explanatiosn can be found at: https://docs.astral.sh/ruff/rules/
|
||||
# or the relevant linter documentation
|
||||
ignore = [
|
||||
"E741", # pycodestyle: ambiguous variable names
|
||||
"E501", # pycodestyle: line too long
|
||||
|
||||
"PLW0603", # pylint: global statement
|
||||
|
||||
"PLR0911", # pylint: too many return statements
|
||||
"PLR0912", # pylint: too many branches
|
||||
"PLR0913", # pylint: too many arguments in function definition
|
||||
"PLR0915", # pylint: too many statements
|
||||
|
||||
"PLR2004", # pylint: constant used in comparison
|
||||
"PLR0402", # pylint: import alias
|
||||
"PLR5501", # pylint: use elif
|
||||
|
||||
"PLW2901", # pylint: redefined loop variable
|
||||
]
|
||||
|
||||
[format]
|
||||
quote-style = "preserve"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue