Delay string interpolations at logging calls

This is a general best practice which brings (slight) performance
improvements and also structured logging.

Enable the hacking check to enforce it.

Change-Id: I662cd623844f51a22787811368c6f36a4ba88aea
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-12-03 23:04:22 +09:00
parent 5da20df08e
commit 010b79efcb

View File

@@ -43,15 +43,16 @@ commands =
coverage report --show-missing
[flake8]
show-source = True
# H904: Delay string interpolations at logging calls
enable-extensions = H106,H203,H904
# E123, E125 skipped as they are invalid PEP-8.
# [H106] Dont put vim configuration in source files
# [H203] Use assertIs(Not)None to check for None
# [W504] line break after binary operator
show-source = True
ignore = E123,E125,W504
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
enable-extensions = H106,H203
[hacking]
import_exceptions =