Add flake8 bugbear checks

This commit is contained in:
Julian Stirling 2025-08-12 13:09:43 +01:00
parent 7ea92ad55f
commit 6142a267db
11 changed files with 40 additions and 30 deletions

View file

@ -109,7 +109,7 @@ select = [
"W", #pycodestyle warnings
"F", # PyFlakes
# "PL", # Pylint (a subset of, catches far less than pylint does)
# "B", # Flake8 bugbear
"B", # Flake8 bugbear
"A", # Flake8 builtins checker
"C", # Flake8 comprehensions
# "FIX", #TODO/FIXME's in code. These should be added during development for ongoing tasks.
@ -136,6 +136,12 @@ ignore = [
# The checkers below should be turned on as they complain about missing docstrings.
]
[tool.ruff.lint.per-file-ignores]
# Tests are currently not fully docstring-ed, we'll ignore this for now.
"tests/*" = [
"B018", # Complaining about useless attribute access in tests, but we need them to check errors are raised
]
[tool.ruff.lint.pydocstyle]
# This lets the D401 checker understand that decorated thing properties and thing
# settings act like properties so should be documented as such.