Fix E128 violations and re-enable gating
E128 got stricter in hacking 0.9, so fix new violations and re-enable gating. Change-Id: Id061f154f97d78bbbcd8704e6213034cce90a841
This commit is contained in:
parent
7b2bea56f3
commit
c3c4839514
@ -95,8 +95,8 @@ class SNMPInspector(base.Inspector):
|
||||
(error, data) = parse_snmp_return(ret)
|
||||
if error:
|
||||
raise SNMPException("An error occurred, oid %(oid)s, "
|
||||
"host %(host)s, %(err)s" % dict(oid=oid,
|
||||
host=host.hostname, err=data))
|
||||
"host %(host)s, %(err)s" %
|
||||
dict(oid=oid, host=host.hostname, err=data))
|
||||
else:
|
||||
return ret_func(data)
|
||||
|
||||
|
@ -186,11 +186,11 @@ class RelationshipTest(scenarios.DBTestBase):
|
||||
meta_tables = [sql_models.MetaText, sql_models.MetaFloat,
|
||||
sql_models.MetaBigInt, sql_models.MetaBool]
|
||||
for table in meta_tables:
|
||||
self.assertEqual(0, session.query(table)
|
||||
self.assertEqual(0, (session.query(table)
|
||||
.filter(~table.id.in_(
|
||||
session.query(sql_models.Sample.id)
|
||||
.group_by(sql_models.Sample.id)
|
||||
)).count())
|
||||
.group_by(sql_models.Sample.id))).count()
|
||||
))
|
||||
|
||||
|
||||
class CapabilitiesTest(test_base.BaseTestCase):
|
||||
|
@ -2566,9 +2566,8 @@ class ComplexAlarmQueryTest(AlarmTestBase,
|
||||
|
||||
def test_filter_and_orderby(self):
|
||||
self.add_some_alarms()
|
||||
result = list(self.conn.query_alarms(filter_expr={"=":
|
||||
{"enabled":
|
||||
True}},
|
||||
result = list(self.conn.query_alarms(filter_expr=
|
||||
{"=": {"enabled": True}},
|
||||
orderby=[{"name": "asc"}]))
|
||||
self.assertEqual(2, len(result))
|
||||
self.assertEqual(["orange-alert", "red-alert"],
|
||||
|
3
tox.ini
3
tox.ini
@ -37,7 +37,6 @@ commands = python setup.py build_sphinx
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# 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
|
||||
@ -45,7 +44,7 @@ commands = {posargs}
|
||||
# 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 = E128,E251,E265,F402,H305,H307,H405,H904
|
||||
ignore = 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…
x
Reference in New Issue
Block a user