Enable E122, E126 and E128 style checks

Improper indent of continued lines.

Change-Id: Iea32ef7dddb5f75681aa4992d8270391e038a1c8
This commit is contained in:
Pavlo Shchelokovskyy 2014-12-14 18:52:03 +02:00
parent 46e5897c3e
commit 9b70d30386
15 changed files with 219 additions and 222 deletions

View File

@ -191,10 +191,10 @@ class ScaleNotificationTest(common.HeatTestCase):
with_error=None):
stack_arn = self.stack.identifier().arn()
expected = [mock.call(self.ctx,
expected = [mock.call(
self.ctx,
'orchestration.autoscaling.start',
{'state_reason':
'Stack CREATE completed successfully',
{'state_reason': 'Stack CREATE completed successfully',
'user_id': 'test_username',
'stack_identity': stack_arn,
'tenant_id': 'test_tenant',
@ -209,7 +209,8 @@ class ScaleNotificationTest(common.HeatTestCase):
'state': 'CREATE_COMPLETE'})
]
if with_error:
expected += [mock.call(self.ctx,
expected += [mock.call(
self.ctx,
'orchestration.autoscaling.error',
{'state_reason':
'Stack CREATE completed successfully',
@ -226,7 +227,8 @@ class ScaleNotificationTest(common.HeatTestCase):
'state': 'CREATE_COMPLETE'})
]
else:
expected += [mock.call(self.ctx,
expected += [mock.call(
self.ctx,
'orchestration.autoscaling.end',
{'state_reason':
'Stack CREATE completed successfully',

View File

@ -1226,7 +1226,8 @@ class StackTest(common.HeatTestCase):
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
'Resources': {
'AResource': {'Type': 'ResourceWithPropsType',
'Metadata': {'Bar': {'Ref': 'AWS::StackId'}},
'Metadata': {'Bar':
{'Ref': 'AWS::StackId'}},
'Properties': {'Foo': 'xyz'}}}}
updated_stack = parser.Stack(self.ctx, 'updated_stack',
@ -1331,9 +1332,8 @@ class StackTest(common.HeatTestCase):
'Policy': {
'Type': 'OS::Heat::AccessPolicy',
'Properties': {
'AllowedResources': ['R1'],
},
}}}
'AllowedResources': ['R1']
}}}}
self.stack = parser.Stack(self.ctx, 'update_stack_access_policy_test',
template.Template(tmpl))
@ -1350,8 +1350,7 @@ class StackTest(common.HeatTestCase):
'Type': 'OS::Heat::AccessPolicy',
'Properties': {
'AllowedResources': ['R1', 'R2'],
},
}}}
}}}}
updated_stack = parser.Stack(self.ctx, 'updated_stack',
template.Template(tmpl2))

View File

@ -1841,8 +1841,7 @@ class ServersTest(common.HeatTestCase):
self.assertEqual([{'net-id': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}],
server._build_nics(
[{'network':
'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}]
))
'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}]))
self.assertEqual([{'net-id': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}],
server._build_nics([{'network': 'public'}]))

View File

@ -53,9 +53,6 @@ commands =
bash tools/config/generate_sample.sh -b . -p heat -o etc/heat
[flake8]
# E122 continuation line missing indentation or outdented
# 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 shadowed by loop variable
@ -70,7 +67,7 @@ commands =
# H405 multi line docstring summary not separated with an empty line
# H803 no full stop at the end of the commit message
# H904 Wrap long lines in parentheses instead of a backslash
ignore = E122,E126,E128,E251,E265,F402,F812,H101,H202,H233,H305,H307,H402,H404,H405,H803,H904
ignore = E251,E265,F402,F812,H101,H202,H233,H305,H307,H402,H404,H405,H803,H904
show-source = true
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
max-complexity=20