Put the ruff per-file ignores on separate lines

Each reason now sits next to its codes,
which reads better than a separate list.
This commit is contained in:
Alexander Hess 2026-12-03 11:47:26 +01:00
commit 47a22f9587
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -728,13 +728,19 @@ external = [
[tool.ruff.lint.per-file-ignores] [tool.ruff.lint.per-file-ignores]
# Type annotations are not strictly enforced "migrations/env.py" = [
"migrations/env.py" = ["ANN0", "ANN2"] "ANN0", "ANN2", # Type annotations are not strictly enforced
# - ANN0, ANN2 => Type annotations are not strictly enforced ]
# - S608 => Do not worry about SQL injection here
"migrations/versions/*.py" = ["ANN0", "ANN2", "S608"] "migrations/versions/*.py" = [
# Type annotations are not strictly enforced "ANN0", "ANN2", # Type annotations are not strictly enforced
"noxfile.py" = ["ANN0", "ANN2"] "S608", # Do not worry about SQL injection here
]
"noxfile.py" = [
"ANN0", "ANN2", # Type annotations are not strictly enforced
]
"research/*.ipynb" = [ "research/*.ipynb" = [
"ANN0", "ANN2", # Type annotations are not strictly enforced "ANN0", "ANN2", # Type annotations are not strictly enforced
"E501", # Exploratory cells read better unwrapped "E501", # Exploratory cells read better unwrapped
@ -744,15 +750,19 @@ external = [
"S605", "S608", # No untrusted input "S605", "S608", # No untrusted input
"T20", # `print()` shows results "T20", # `print()` shows results
] ]
# `print()` is ok in ad-hoc scripts
"scripts/**" = ["T20"] "scripts/**" = [
# - ANN0, ANN2 => Type annotations are not strictly enforced "T20", # `print()` is ok in ad-hoc scripts
# - D106 => The `Meta` class inside the factory_boy models do not need a docstring ]
# - PLR0913, PLR0917 => `pytest` passes fixtures as arguments
# - S101 => `assert` statements are ok in the test suite "tests/**/*.py" = [
# - S311 => The `random` module is not used for cryptography "ANN0", "ANN2", # Type annotations are not strictly enforced
# - SLF001 => Tests may set up and inspect private members "D106", # The `Meta` class inside the factory_boy models do not need a docstring
"tests/**/*.py" = ["ANN0", "ANN2", "D106", "PLR0913", "PLR0917", "S101", "S311", "SLF001"] "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
"SLF001", # Tests may set up and inspect private members
]
[tool.ruff.lint.flake8-pytest-style] # aligned with [tool.flake8] above [tool.ruff.lint.flake8-pytest-style] # aligned with [tool.flake8] above