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:
parent
7a000145a7
commit
47a22f9587
1 changed files with 26 additions and 16 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue