Fix H405 violations
There are a lot of H405 violation codes. We need to fix the code for avoiding more violations. Change-Id: I0db7b2276126f60768dde0cdf6ebd8681029ec10 Closes-Bug: #1521899
This commit is contained in:
parent
d6a970b6e9
commit
50d44ae0d5
|
@ -108,6 +108,7 @@ def bay_show(request, id):
|
|||
|
||||
def container_create(request, bay_uuid, **kwargs):
|
||||
"""Creates a container object
|
||||
|
||||
:param request: Request context
|
||||
:param bay_uuid: ID of a bay (Required)
|
||||
:param kwargs: Image ID, Name, Command, Memory
|
||||
|
@ -118,6 +119,7 @@ def container_create(request, bay_uuid, **kwargs):
|
|||
|
||||
def container_delete(request, id):
|
||||
"""Deletes a container
|
||||
|
||||
:param request: Request context
|
||||
:param id: The ID of the container to delete
|
||||
"""
|
||||
|
@ -127,6 +129,7 @@ def container_delete(request, id):
|
|||
def container_list(request, marker=None, limit=None, sort_key=None,
|
||||
sort_dir=None, detail=False):
|
||||
"""Lists all containers
|
||||
|
||||
:param request: Request context
|
||||
:param marker: Optional, ID of last container in previous results
|
||||
:param limit: '==0' return all, '> 0' specifies max, None respects max
|
||||
|
@ -142,6 +145,7 @@ def container_list(request, marker=None, limit=None, sort_key=None,
|
|||
|
||||
def container_show(request, id):
|
||||
"""Get an individual container
|
||||
|
||||
:param request: Request context
|
||||
:param id: ID of the container to get
|
||||
"""
|
||||
|
|
|
@ -32,21 +32,18 @@ def change_to_id(obj):
|
|||
|
||||
@urls.register
|
||||
class BayModel(generic.View):
|
||||
"""API for retrieving a single baymodel
|
||||
"""
|
||||
"""API for retrieving a single baymodel"""
|
||||
url_regex = r'containers/baymodels/(?P<baymodel_id>[^/]+)$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
def get(self, request, baymodel_id):
|
||||
"""Get a specific baymodel
|
||||
"""
|
||||
"""Get a specific baymodel"""
|
||||
return magnum.baymodel_show(request, baymodel_id).to_dict()
|
||||
|
||||
|
||||
@urls.register
|
||||
class BayModels(generic.View):
|
||||
"""API for Magnum BayModels
|
||||
"""
|
||||
"""API for Magnum BayModels"""
|
||||
url_regex = r'containers/baymodels/$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
|
@ -82,21 +79,18 @@ class BayModels(generic.View):
|
|||
|
||||
@urls.register
|
||||
class Bay(generic.View):
|
||||
"""API for retrieving a single bay
|
||||
"""
|
||||
"""API for retrieving a single bay"""
|
||||
url_regex = r'containers/bays/(?P<bay_id>[^/]+)$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
def get(self, request, bay_id):
|
||||
"""Get a specific bay
|
||||
"""
|
||||
"""Get a specific bay"""
|
||||
return magnum.bay_show(request, bay_id).to_dict()
|
||||
|
||||
|
||||
@urls.register
|
||||
class Bays(generic.View):
|
||||
"""API for Magnum Bays
|
||||
"""
|
||||
"""API for Magnum Bays"""
|
||||
url_regex = r'containers/bays/$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
|
@ -132,21 +126,18 @@ class Bays(generic.View):
|
|||
|
||||
@urls.register
|
||||
class Container(generic.View):
|
||||
"""API for retrieving a single container
|
||||
"""
|
||||
"""API for retrieving a single container"""
|
||||
url_regex = r'containers/containers/(?P<container_id>[^/]+)$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
def get(self, request, container_id):
|
||||
"""Get a specific container
|
||||
"""
|
||||
"""Get a specific container"""
|
||||
return magnum.container_show(request, container_id).to_dict()
|
||||
|
||||
|
||||
@urls.register
|
||||
class Containers(generic.View):
|
||||
"""API for Magnum Containers
|
||||
"""
|
||||
"""API for Magnum Containers"""
|
||||
url_regex = r'containers/containers/$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -56,8 +56,6 @@ commands = python setup.py build_sphinx
|
|||
|
||||
[flake8]
|
||||
exclude = .venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
ignore = H405
|
||||
max-complexity = 20
|
||||
|
||||
[hacking]
|
||||
|
|
Loading…
Reference in New Issue