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
|
# FIXME: Replace DBHook with a hooks.TransactionHook
|
||||||
app_hooks = [hooks.ConfigHook(),
|
app_hooks = [hooks.ConfigHook(),
|
||||||
hooks.DBHook(
|
hooks.DBHook(
|
||||||
storage.get_connection_from_config(cfg.CONF),
|
storage.get_connection_from_config(cfg.CONF),),
|
||||||
),
|
|
||||||
hooks.PipelineHook(),
|
hooks.PipelineHook(),
|
||||||
hooks.TranslationHook()]
|
hooks.TranslationHook()]
|
||||||
if extra_hooks:
|
if extra_hooks:
|
||||||
|
@ -97,8 +97,7 @@ class _Base(plugin.CentralPollster):
|
|||||||
"checksum",
|
"checksum",
|
||||||
"deleted_at",
|
"deleted_at",
|
||||||
"min_ram",
|
"min_ram",
|
||||||
"size",
|
"size", ])
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
class ImagePollster(_Base):
|
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://'],
|
'actions': ['log://'],
|
||||||
'alarm_id': 'foobar',
|
'alarm_id': 'foobar',
|
||||||
'condition': {'threshold': 42},
|
'condition': {'threshold': 42}})
|
||||||
})
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _fake_spawn_n(func, *args, **kwargs):
|
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(),
|
def create_and_store_sample(self, timestamp=datetime.datetime.utcnow(),
|
||||||
metadata={
|
metadata={
|
||||||
'display_name': 'test-server',
|
'display_name': 'test-server',
|
||||||
'tag': 'self.counter'
|
'tag': 'self.counter'},
|
||||||
},
|
|
||||||
name='instance',
|
name='instance',
|
||||||
sample_type=sample.TYPE_CUMULATIVE, unit='',
|
sample_type=sample.TYPE_CUMULATIVE, unit='',
|
||||||
volume=1, user_id='user-id',
|
volume=1, user_id='user-id',
|
||||||
|
4
tox.ini
4
tox.ini
@ -37,17 +37,15 @@ commands = python setup.py build_sphinx
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E126 continuation line over-indented for hanging indent
|
|
||||||
# E128 continuation line under-indented for visual indent
|
# E128 continuation line under-indented for visual indent
|
||||||
# E251 unexpected spaces around keyword / parameter equals
|
# E251 unexpected spaces around keyword / parameter equals
|
||||||
# E265 block comment should start with ‘# ‘
|
# E265 block comment should start with ‘# ‘
|
||||||
# F402 import module shadowed by loop variable
|
# F402 import module shadowed by loop variable
|
||||||
# H104 file contains nothing but comments
|
|
||||||
# H305 imports not grouped correctly
|
# H305 imports not grouped correctly
|
||||||
# H307 like imports should be grouped together
|
# H307 like imports should be grouped together
|
||||||
# H405 multi line docstring summary not separated with an empty line
|
# H405 multi line docstring summary not separated with an empty line
|
||||||
# H904 Wrap long lines in parentheses instead of a backslash
|
# 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 = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,./ceilometer/openstack/common,*lib/python*,*egg,tools,nova_tests,build
|
exclude=.venv,.git,.tox,dist,doc,./ceilometer/openstack/common,*lib/python*,*egg,tools,nova_tests,build
|
||||||
show-source = True
|
show-source = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user