Enable E122, E126 and E128 style checks
Improper indent of continued lines. Change-Id: Iea32ef7dddb5f75681aa4992d8270391e038a1c8
This commit is contained in:
parent
46e5897c3e
commit
9b70d30386
@ -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',
|
||||
|
@ -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))
|
||||
|
@ -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'}]))
|
||||
|
@ -170,18 +170,18 @@ class SoftwareComponentValidationTest(common.HeatTestCase):
|
||||
err_msg='Property configs not assigned')
|
||||
),
|
||||
# do not test until bug #1350840
|
||||
# (
|
||||
# 'empty_configs',
|
||||
# dict(snippet='''
|
||||
# component:
|
||||
# type: OS::Heat::SoftwareComponent
|
||||
# properties:
|
||||
# configs:
|
||||
# ''',
|
||||
# err=exception.StackValidationFailed,
|
||||
# err_msg='configs length (0) is out of range '
|
||||
# '(min: 1, max: None)')
|
||||
# ),
|
||||
#(
|
||||
# 'empty_configs',
|
||||
# dict(snippet='''
|
||||
# component:
|
||||
# type: OS::Heat::SoftwareComponent
|
||||
# properties:
|
||||
# configs:
|
||||
# ''',
|
||||
# err=exception.StackValidationFailed,
|
||||
# err_msg='configs length (0) is out of range '
|
||||
# '(min: 1, max: None)')
|
||||
#),
|
||||
(
|
||||
'invalid_configs',
|
||||
dict(snippet='''
|
||||
|
5
tox.ini
5
tox.ini
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user