Fix E126,H104 violations and re-enable gating
E126 and H104 got stricter in hacking 0.9, so fix new violations and re-enable gating. Change-Id: I09704ae7397b00045303ac102bf7ba37d870a7f6
This commit is contained in:
parent
0600d3877f
commit
7b2bea56f3
@ -54,8 +54,7 @@ def setup_app(pecan_config=None, extra_hooks=None):
|
||||
# FIXME: Replace DBHook with a hooks.TransactionHook
|
||||
app_hooks = [hooks.ConfigHook(),
|
||||
hooks.DBHook(
|
||||
storage.get_connection_from_config(cfg.CONF),
|
||||
),
|
||||
storage.get_connection_from_config(cfg.CONF),),
|
||||
hooks.PipelineHook(),
|
||||
hooks.TranslationHook()]
|
||||
if extra_hooks:
|
||||
|
@ -97,8 +97,7 @@ class _Base(plugin.CentralPollster):
|
||||
"checksum",
|
||||
"deleted_at",
|
||||
"min_ram",
|
||||
"size",
|
||||
])
|
||||
"size", ])
|
||||
|
||||
|
||||
class ImagePollster(_Base):
|
||||
|
@ -1 +0,0 @@
|
||||
# template repository default module
|
@ -1 +0,0 @@
|
||||
# template repository default versions module
|
@ -81,8 +81,7 @@ class TestAlarmNotifier(tests_base.BaseTestCase):
|
||||
{
|
||||
'actions': ['log://'],
|
||||
'alarm_id': 'foobar',
|
||||
'condition': {'threshold': 42},
|
||||
})
|
||||
'condition': {'threshold': 42}})
|
||||
|
||||
@staticmethod
|
||||
def _fake_spawn_n(func, *args, **kwargs):
|
||||
|
@ -38,8 +38,7 @@ class DBTestBase(tests_db.TestBase):
|
||||
def create_and_store_sample(self, timestamp=datetime.datetime.utcnow(),
|
||||
metadata={
|
||||
'display_name': 'test-server',
|
||||
'tag': 'self.counter'
|
||||
},
|
||||
'tag': 'self.counter'},
|
||||
name='instance',
|
||||
sample_type=sample.TYPE_CUMULATIVE, unit='',
|
||||
volume=1, user_id='user-id',
|
||||
|
4
tox.ini
4
tox.ini
@ -37,17 +37,15 @@ commands = python setup.py build_sphinx
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# E126 continuation line over-indented for hanging indent
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# E251 unexpected spaces around keyword / parameter equals
|
||||
# E265 block comment should start with ‘# ‘
|
||||
# F402 import module shadowed by loop variable
|
||||
# H104 file contains nothing but comments
|
||||
# H305 imports not grouped correctly
|
||||
# H307 like imports should be grouped together
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
ignore = E126,E128,E251,E265,F402,H104,H305,H307,H405,H904
|
||||
ignore = E128,E251,E265,F402,H305,H307,H405,H904
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,./ceilometer/openstack/common,*lib/python*,*egg,tools,nova_tests,build
|
||||
show-source = True
|
||||
|
Loading…
Reference in New Issue
Block a user