Enable SLF in ruff
This commit is contained in:
parent
99dda74a9e
commit
d0326aee4f
1 changed files with 10 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue