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]
# Type annotations are not strictly enforced
"migrations/env.py" = ["ANN0", "ANN2"]
# - ANN0, ANN2 => Type annotations are not strictly enforced
# - S608 => Do not worry about SQL injection here
"migrations/versions/*.py" = ["ANN0", "ANN2", "S608"]
# Type annotations are not strictly enforced
"noxfile.py" = ["ANN0", "ANN2"]
"migrations/env.py" = [
"ANN0", "ANN2", # Type annotations are not strictly enforced
]
"migrations/versions/*.py" = [
"ANN0", "ANN2", # Type annotations are not strictly enforced
"S608", # Do not worry about SQL injection here
]
"noxfile.py" = [
"ANN0", "ANN2", # Type annotations are not strictly enforced
]
"research/*.ipynb" = [
"ANN0", "ANN2", # Type annotations are not strictly enforced
"E501", # Exploratory cells read better unwrapped
@ -744,15 +750,19 @@ external = [
"S605", "S608", # No untrusted input
"T20", # `print()` shows results
]
# `print()` is ok in ad-hoc scripts
"scripts/**" = ["T20"]
# - ANN0, ANN2 => Type annotations are not strictly enforced
# - 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
# - S311 => The `random` module is not used for cryptography
# - SLF001 => Tests may set up and inspect private members
"tests/**/*.py" = ["ANN0", "ANN2", "D106", "PLR0913", "PLR0917", "S101", "S311", "SLF001"]
"scripts/**" = [
"T20", # `print()` is ok in ad-hoc scripts
]
"tests/**/*.py" = [
"ANN0", "ANN2", # Type annotations are not strictly enforced
"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
"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