Skip to content

Commit

Permalink
Enable ruff preview checks
Browse files Browse the repository at this point in the history
This extends the number of checks to pass for the ruff linter
considerably, by including rules that are currently only marked
for preview in ruff. These rules are in preview due to the automatic
fix not being ready, but it does not mean that the rule is not
valid.

All existing issues found by enabling this are currently marked
as exceptions, to be solved one by one. At least, enabling this
at least ensure that no new issues can be introduced unknowingly
into the code base
  • Loading branch information
berland committed Jun 18, 2024
1 parent 94d6911 commit f458eec
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,33 @@ select = [
"F", # pyflakes
"PL", # pylint
]
preview = true
ignore = ["PLW2901", # redefined-loop-name
"PLR2004", # magic-value-comparison
"PLR0915", # too-many-statements
"PLR0912", # too-many-branches
"PLR5501", # collapsible-else-if
"PLR0911", # too-many-return-statements
"PLR0911", # too-many-return-statements
"PLC2701", # import-private-name
"PLR6201", # literal-membership
"PLR0914", # too-many-locals
"F841", # unused-variable
"PLW1514", # unspecified-encoding
"PLR6104", # non-augmented-assignment
"PLR6301", # no-self-use
"PLW1641", # eq-without-hash
"PLC0415", # import-outside-toplevel
"PLR0904", # too-many-public-methods
"PLR1702", # too-many-nested-blocks
"SIM103", # needless-bool
"PLW3201", # bad-dunder-method-name
"PLR1704", # redefined-argument-from-local
"PLC1901", # compare-to-empty-string
"SIM300", # yoda-conditions
"PLW0128", # redeclared-assigned-name
"PLW0108", # unnecessary-lambda
"PLR1730", # if-stmt-min-max
"PLC2801", # unnecessary-dunder-call
]

[tool.ruff.lint.extend-per-file-ignores]
Expand Down

0 comments on commit f458eec

Please sign in to comment.