Fix pylint error:H405
Fix pylint H405: multi line docstring summary not separated with an empty line Change-Id: Ic2579afbc20319fc5e35c5170cf33f1e39a8e7f7
This commit is contained in:
parent
716266f5d7
commit
ed5462edac
@ -74,6 +74,7 @@ def _get_service_url(request):
|
|||||||
|
|
||||||
def get_schedule_info(context):
|
def get_schedule_info(context):
|
||||||
"""Get schedule info from context
|
"""Get schedule info from context
|
||||||
|
|
||||||
"""
|
"""
|
||||||
scheduling = {}
|
scheduling = {}
|
||||||
try:
|
try:
|
||||||
@ -396,6 +397,7 @@ class Action(object):
|
|||||||
|
|
||||||
def _build(self, action):
|
def _build(self, action):
|
||||||
"""Get a flat action dict and convert it to a freezer action format
|
"""Get a flat action dict and convert it to a freezer action format
|
||||||
|
|
||||||
"""
|
"""
|
||||||
action_rules = {}
|
action_rules = {}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
def create_dict(**kwargs):
|
def create_dict(**kwargs):
|
||||||
"""Create a dict only with values that exists so we avoid send keys with
|
"""Create a dict only with values that exists so we avoid send keys with
|
||||||
|
|
||||||
None values
|
None values
|
||||||
"""
|
"""
|
||||||
return {k: v for k, v in kwargs.items() if v}
|
return {k: v for k, v in kwargs.items() if v}
|
||||||
@ -53,6 +54,7 @@ def create_dummy_id():
|
|||||||
|
|
||||||
def get_action_ids(ids):
|
def get_action_ids(ids):
|
||||||
"""Return an ordered list of actions for a new job
|
"""Return an ordered list of actions for a new job
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ids = ids.split('===')
|
ids = ids.split('===')
|
||||||
return [i for i in ids if i]
|
return [i for i in ids if i]
|
||||||
@ -60,6 +62,7 @@ def get_action_ids(ids):
|
|||||||
|
|
||||||
def assign_and_remove(source_dict, dest_dict, key):
|
def assign_and_remove(source_dict, dest_dict, key):
|
||||||
"""Assign a value to a destination dict from a source dict
|
"""Assign a value to a destination dict from a source dict
|
||||||
|
|
||||||
if the key exists
|
if the key exists
|
||||||
"""
|
"""
|
||||||
if key in source_dict:
|
if key in source_dict:
|
||||||
@ -183,6 +186,7 @@ class ClientObject(object):
|
|||||||
|
|
||||||
def shield(message, redirect=''):
|
def shield(message, redirect=''):
|
||||||
"""decorator to reduce boilerplate try except blocks for horizon functions
|
"""decorator to reduce boilerplate try except blocks for horizon functions
|
||||||
|
|
||||||
:param message: a str error message
|
:param message: a str error message
|
||||||
:param redirect: a str with the redirect namespace without including
|
:param redirect: a str with the redirect namespace without including
|
||||||
horizon:disaster_recovery:
|
horizon:disaster_recovery:
|
||||||
@ -216,6 +220,7 @@ def shield(message, redirect=''):
|
|||||||
|
|
||||||
def timestamp_to_iso(ts):
|
def timestamp_to_iso(ts):
|
||||||
"""Generate an iso date from time stamp
|
"""Generate an iso date from time stamp
|
||||||
|
|
||||||
:param ts: time stamp
|
:param ts: time stamp
|
||||||
:return: iso date
|
:return: iso date
|
||||||
"""
|
"""
|
||||||
|
3
tox.ini
3
tox.ini
@ -48,7 +48,8 @@ commands = pylint --rcfile .pylintrc disaster_recovery
|
|||||||
# W504 line break after binary operator
|
# W504 line break after binary operator
|
||||||
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,tools,doc
|
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,tools,doc
|
||||||
max-complexity = 20
|
max-complexity = 20
|
||||||
ignore = H405,H404,H403,H401,H238,H306,H701,W504
|
ignore = H404,H403,H401,H238,H306,H701,W504
|
||||||
|
#H405
|
||||||
|
|
||||||
[testenv:lower-constraints]
|
[testenv:lower-constraints]
|
||||||
deps =
|
deps =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user