Enable flake8-logging-format extension

The flake8-logging-format extension includes several checks for things
we've had to try to catch in code reviews until now. This enables the
extension and fixes the few cases where things had slipped through code
review.

G200: Logging statements should not include the exception in logged string
is disabled since that triggers a lot more issues, some of which may be
acceptable. That can be left as a follow up exercise if we want to clean
those up and enable all checks.

Change-Id: I1dedc0b31f78f518c2ab5dee5ed7abda1c1d9296
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis
2019-12-19 10:46:37 -06:00
parent 14e6385420
commit 1f7b0efdcc
11 changed files with 15 additions and 21 deletions

View File

@@ -188,7 +188,9 @@ usedevelop = False
# tools from getting in our way with regards to this.
# H101 include name with TODO
# reason: no real benefit
ignore = E251,E402,W503,W504,H101
# G200 Logging statements should not include the exception
# reason: Many existing cases of this that may be legitimate
ignore = E251,E402,W503,W504,H101,G200
# H904 Delay string interpolations at logging calls.
enable-extensions = H106,H203,H904
exclude = .git,.venv,.tox,dist,tools,doc/ext,*egg,build