Enable SLF in ruff

This commit is contained in:
Alexander Hess 2026-11-30 22:35:24 +01:00
commit d0326aee4f
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -257,6 +257,8 @@ select = [
# "PL",
# flake8-use-pathlib => `pathlib` instead of `os` functions
# "PTH",
# flake8-self => No access to private members from outside
# "SLF",
# pyupgrade => Modern syntax for the targeted Python version
# "UP",
]
@ -541,6 +543,8 @@ select = [
"PL",
# flake8-use-pathlib => `pathlib` instead of `os` functions
"PTH",
# flake8-self => No access to private members from outside
"SLF",
# flake8-print => no `print()`
"T20",
# pyupgrade => Modern syntax for the targeted Python version
@ -579,7 +583,8 @@ extend-ignore = [
# - PLR0913, PLR0917 => `pytest` passes fixtures as arguments.
# - S101 => `assert` statements are ok in the test suite.
# - S311 => The `random` module is not used for cryptography.
"tests/**/*.py" = ["ANN0", "ANN2", "D106", "PLR0913", "PLR0917", "S101", "S311"]
# - SLF001 => Tests may set up and inspect private members.
"tests/**/*.py" = ["ANN0", "ANN2", "D106", "PLR0913", "PLR0917", "S101", "S311", "SLF001"]
[tool.ruff.lint.flake8-pytest-style] # aligned with [tool.flake8] above