Remove [H405] and [H404] ignoring in tox.ini
Remove H405 and H404 rule from ignored rules in tox.ini. Also, fix some new [H405]/[H404] errors. Change-Id: I71065e2c3c300aa69ce204ee78672b08ca413651
This commit is contained in:
parent
c4b0ced813
commit
1a972838ba
@ -28,8 +28,7 @@ from heat.common.i18n import _
|
||||
|
||||
|
||||
class ExceptionFilter(object):
|
||||
"""
|
||||
A context manager that prevents some exceptions from being raised.
|
||||
"""A context manager that prevents some exceptions from being raised.
|
||||
|
||||
For backwards compatibility, these objects can also be called with the
|
||||
exception value as an argument - any non-matching exception will be
|
||||
@ -55,7 +54,6 @@ class ExceptionFilter(object):
|
||||
... assert False
|
||||
... except Exception as ex:
|
||||
... ignore_assertions(ex)
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, should_ignore_ex):
|
||||
@ -73,8 +71,7 @@ class ExceptionFilter(object):
|
||||
return self._should_ignore_ex(exc_val)
|
||||
|
||||
def __call__(self, ex):
|
||||
"""
|
||||
Re-raise any exception value not being filtered out.
|
||||
"""Re-raise any exception value not being filtered out.
|
||||
|
||||
If the exception was the last to be raised, it will be re-raised with
|
||||
its original traceback.
|
||||
|
@ -260,13 +260,12 @@ class Replace(cfn_funcs.Replace):
|
||||
|
||||
|
||||
class ReplaceJson(Replace):
|
||||
'''
|
||||
A function for performing string substitutions.
|
||||
"""A function for performing string substitutions.
|
||||
|
||||
Behaves the same as Replace, but tolerates non-string parameter
|
||||
values, e.g map/list - these are serialized as json before doing
|
||||
the string substitution.
|
||||
'''
|
||||
"""
|
||||
|
||||
def result(self):
|
||||
template = function.resolve(self._string)
|
||||
|
@ -120,7 +120,7 @@ class Resource(object):
|
||||
signal_needs_metadata_updates = True
|
||||
|
||||
def __new__(cls, name, definition, stack):
|
||||
'''Create a new Resource of the appropriate class for its type.'''
|
||||
"""Create a new Resource of the appropriate class for its type."""
|
||||
|
||||
assert isinstance(definition, rsrc_defn.ResourceDefinition)
|
||||
|
||||
@ -1092,24 +1092,22 @@ class Resource(object):
|
||||
return name[0:2] + '-' + name[-postfix_length:]
|
||||
|
||||
def validate(self):
|
||||
'''
|
||||
Validate the resource.
|
||||
"""Validate the resource.
|
||||
|
||||
This may be overridden by resource plugins to add extra
|
||||
validation logic specific to the resource implementation.
|
||||
'''
|
||||
"""
|
||||
LOG.info(_LI('Validating %s'), six.text_type(self))
|
||||
return self.validate_template()
|
||||
|
||||
def validate_template(self):
|
||||
'''
|
||||
Validate strucural/syntax aspects of the resource definition.
|
||||
"""Validate structural/syntax aspects of the resource definition.
|
||||
|
||||
Resource plugins should not override this, because this interface
|
||||
is expected to be called pre-create so things normally valid
|
||||
in an overridden validate() such as accessing properties
|
||||
may not work.
|
||||
'''
|
||||
"""
|
||||
function.validate(self.t)
|
||||
self.validate_deletion_policy(self.t.deletion_policy())
|
||||
self.t.update_policy(self.update_policy_schema,
|
||||
|
@ -958,9 +958,7 @@ class EngineService(service.Service):
|
||||
@context.request_context
|
||||
def validate_template(self, cnxt, template, params=None, files=None,
|
||||
show_nested=False):
|
||||
"""
|
||||
The validate_template method uses the stack parser to check
|
||||
the validity of a template.
|
||||
"""Uses the stack parser to check the validity of a template.
|
||||
|
||||
:param cnxt: RPC context.
|
||||
:param template: Template of stack you want to create.
|
||||
|
3
tox.ini
3
tox.ini
@ -61,9 +61,6 @@ deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = bandit -c bandit.yaml -r heat -n5 -p heat_conservative
|
||||
|
||||
[flake8]
|
||||
# H404 multi line docstring should start with a summary
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
ignore = H404,H405
|
||||
show-source = true
|
||||
exclude=.*,dist,*openstack/common*,*lib/python*,*egg,tools,build,*convergence/scenarios/*
|
||||
max-complexity=20
|
||||
|
Loading…
Reference in New Issue
Block a user