Skip to content

Commit

Permalink
Reorganise ruff rules
Browse files Browse the repository at this point in the history
Use the same rule ordering as the ruff documentation:
https://docs.astral.sh/ruff/rules/
  • Loading branch information
DimitriPapadopoulos committed Nov 7, 2024
1 parent 8aab23e commit a2ff24f
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -234,34 +234,32 @@ extend-exclude = [
]

[tool.ruff.lint]
# E402: module level import not at top of file
# E501: line too long - let the formatter worry about that
# E731: do not assign a lambda expression, use a def
extend-select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"TID", # flake8-tidy-imports (absolute imports)
"PGH", # pygrep-hooks
"RUF",
]
extend-safe-fixes = [
"TID252", # absolute imports
]
ignore = [
"E402",
"E501",
"E731",
"UP007",
"RUF001",
"RUF002",
"RUF003",
"RUF005",
"RUF007",
"RUF012",
]
extend-select = [
"B", # flake8-bugbear
"F", # Pyflakes
"E", # Pycodestyle
"W",
"TID", # flake8-tidy-imports (absolute imports)
"I", # isort
"PGH", # pygrep-hooks
"RUF",
"UP", # Pyupgrade
"E402", # module level import not at top of file
"E501", # line too long - let the formatter worry about that
"E731", # do not assign a lambda expression, use a def
"UP007", # use X | Y for type annotations
"UP027", # deprecated
"RUF001", # string contains ambiguous unicode character
"RUF002", # docstring contains ambiguous acute accent unicode character
"RUF003", # comment contains ambiguous no-break space unicode character
"RUF005", # consider upacking operator instead of concatenation
"RUF007", # prefer itertools.pairwise() over zip()
"RUF012", # mutable class attributes
]

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

0 comments on commit a2ff24f

Please sign in to comment.