Enable some off-by-default checks
Some of the available checks are disabled by default, like: [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 Change-Id: I7450cd259fffa2a97fcb28cc61727532478eeccb
This commit is contained in:
parent
4b923bca84
commit
4dc446542d
@ -465,7 +465,7 @@ class OpenSwanProcess(BaseSwanProcess):
|
||||
# indicates something bad has happened and this is
|
||||
# valuable information for figuring it out.
|
||||
LOG.error('Process %(pid)s exists with command '
|
||||
'line %(cmd_line)s.' %
|
||||
'line %(cmd_line)s.',
|
||||
{'pid': pid, 'cmd_line': cmd_line})
|
||||
return True
|
||||
|
||||
|
@ -82,7 +82,7 @@ class StrongSwanProcess(ipsec.BaseSwanProcess):
|
||||
self.DIALECT_MAP['v2'] = 'ikev2'
|
||||
self.DIALECT_MAP['sha256'] = 'sha256'
|
||||
self._strongswan_piddir = self._get_strongswan_piddir()
|
||||
LOG.debug("strongswan piddir is '%s'" % (self._strongswan_piddir))
|
||||
LOG.debug("strongswan piddir is '%s'", (self._strongswan_piddir))
|
||||
super(StrongSwanProcess, self).__init__(conf, process_id,
|
||||
vpnservice, namespace)
|
||||
|
||||
|
@ -137,7 +137,7 @@ class VPNDriverPlugin(VPNPlugin, vpn_db.VPNPluginRpcDbMixin):
|
||||
# Use default provider
|
||||
provider = self.default_provider
|
||||
|
||||
LOG.debug("Selected provider %s" % provider)
|
||||
LOG.debug("Selected provider %s", provider)
|
||||
return provider
|
||||
|
||||
def _get_driver_for_vpnservice(self, context, vpnservice):
|
||||
|
5
tox.ini
5
tox.ini
@ -87,7 +87,12 @@ commands = sphinx-build -W -b html doc/source doc/build
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# TODO(dougwig) -- uncomment this to test for remaining linkages
|
||||
# N530 direct neutron imports not allowed
|
||||
# N531 Log messages require translation hints
|
||||
# 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
|
||||
ignore = E125,E126,E128,E129,E265,H404,H405,N530,N531
|
||||
enable-extensions=H106,H203,H904
|
||||
show-source = true
|
||||
exclude = .venv,.git,.tox,dist,doc,.tmp,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios
|
||||
import-order-style = pep8
|
||||
|
Loading…
Reference in New Issue
Block a user