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: Ibc6e383f0e2907e47bbc9658b2d0d387cf935988
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-12-03 23:18:34 +09:00
parent 82abacde21
commit 7acba8978e

View File

@@ -84,11 +84,12 @@ commands =
oslo-config-generator --config-file=etc/castellan/sample-config-generator.conf
[flake8]
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
enable-extensions = H106,H203
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# H904: Delay string interpolations at logging calls
enable-extensions = H106,H203,H904
[hacking]
import_exceptions = castellan.i18n