Enable RUF in ruff

This commit is contained in:
Alexander Hess 2026-11-30 23:17:41 +01:00
commit c56fe649b7
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -265,6 +265,8 @@ select = [
# "PL",
# flake8-use-pathlib => `pathlib` instead of `os` functions
# "PTH",
# Ruff-specific rules => Fewer bugs and cleaner code
# "RUF",
# flake8-self => No access to private members from outside
# "SLF",
# pyupgrade => Modern syntax for the targeted Python version
@ -559,6 +561,8 @@ select = [
"PL",
# flake8-use-pathlib => `pathlib` instead of `os` functions
"PTH",
# Ruff-specific rules => Fewer bugs and cleaner code
"RUF",
# flake8-self => No access to private members from outside
"SLF",
# flake8-print => no `print()`
@ -576,11 +580,20 @@ extend-ignore = [
"PT023",
# An `elif` after a `return` keeps a case distinction together.
"RET505",
# Some "# noqa" comments are only for `flake8`, which `ruff` cannot know.
"RUF100",
# TODOs need neither an author nor an issue.
"TD002", "TD003",
]
# Codes only `flake8` knows, kept in "# noqa" comments
external = [
"B902",
"DOC",
]
[tool.ruff.lint.per-file-ignores]
# Top-levels of a sub-packages are intended to import a lot.