Enable H904 check

H904 allows the logging package to skip creating the formatted log
message if the message is not going to be emitted because of the
current log level.

Change-Id: Ib736990696cdcbec360303e744aab9fa4cf82c91
See: https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages
This commit is contained in:
Ngo Quoc Cuong 2017-07-06 03:17:45 -04:00
parent 5df137b566
commit 8fdaeda7eb
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,8 @@ commands = bandit -c bandit.yaml -r sahara -n5 -p sahara_default -x tests
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
# [H904] Delay string interpolations at logging calls.
enable-extensions=H904
[hacking]
import_exceptions = sahara.i18n