Fix H405 violations
There are H405 violation codes. We need to fix the code for avoiding more violations. Change-Id: Ia42cc20f2d2c19740feb57f80f166d715e4abc88 Closes-Bug: #1521899
This commit is contained in:
parent
e19fc3bd54
commit
14f41fb1a3
2
tox.ini
2
tox.ini
@ -59,8 +59,6 @@ downloadcache = ~/cache/pip
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
exclude = .venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject
|
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
|
max-complexity = 20
|
||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
|
@ -22,21 +22,18 @@ from openstack_dashboard.api.rest import utils as rest_utils
|
|||||||
|
|
||||||
@urls.register
|
@urls.register
|
||||||
class Queue(generic.View):
|
class Queue(generic.View):
|
||||||
"""API for retrieving a single queue
|
"""API for retrieving a single queue"""
|
||||||
"""
|
|
||||||
url_regex = r'zaqar/queues/(?P<queue_name>[^/]+)$'
|
url_regex = r'zaqar/queues/(?P<queue_name>[^/]+)$'
|
||||||
|
|
||||||
@rest_utils.ajax()
|
@rest_utils.ajax()
|
||||||
def get(self, request, queue_name):
|
def get(self, request, queue_name):
|
||||||
"""Get a specific queue
|
"""Get a specific queue"""
|
||||||
"""
|
|
||||||
return zaqar.queue_show(request, queue_name).to_dict()
|
return zaqar.queue_show(request, queue_name).to_dict()
|
||||||
|
|
||||||
|
|
||||||
@urls.register
|
@urls.register
|
||||||
class Queues(generic.View):
|
class Queues(generic.View):
|
||||||
"""API for queues
|
"""API for queues"""
|
||||||
"""
|
|
||||||
url_regex = r'zaqar/queues/$'
|
url_regex = r'zaqar/queues/$'
|
||||||
|
|
||||||
@rest_utils.ajax()
|
@rest_utils.ajax()
|
||||||
|
@ -55,12 +55,11 @@ def queue_list(request, limit=None, marker=None):
|
|||||||
|
|
||||||
|
|
||||||
def queue_create(request, queue_name, metadata):
|
def queue_create(request, queue_name, metadata):
|
||||||
"""Pop up a modal form, which contains several inputbox:
|
# Pop up a modal form, which contains several inputbox:
|
||||||
1. queue_name
|
# 1. queue_name
|
||||||
2. ttl
|
# 2. ttl
|
||||||
3. max message size
|
# 3. max message size
|
||||||
4. Metadata
|
# 4. Metadata
|
||||||
"""
|
|
||||||
|
|
||||||
queue = zaqarclient(request).queue(queue_name, force_create=True)
|
queue = zaqarclient(request).queue(queue_name, force_create=True)
|
||||||
queue.metadata(new_meta=metadata)
|
queue.metadata(new_meta=metadata)
|
||||||
@ -72,9 +71,8 @@ def queue_delete(request, queue_name):
|
|||||||
|
|
||||||
|
|
||||||
def queue_update(request, queue_name, metadata):
|
def queue_update(request, queue_name, metadata):
|
||||||
"""Popup a modal form, the queue name is a realonly label or inputbox.
|
# Popup a modal form, the queue name is a realonly label or inputbox.
|
||||||
user can change ttl, max message size and metadata
|
# user can change ttl, max message size and metadata
|
||||||
"""
|
|
||||||
|
|
||||||
queue = zaqarclient(request).queue(queue_name, auto_create=False)
|
queue = zaqarclient(request).queue(queue_name, auto_create=False)
|
||||||
queue.metadata(new_meta=metadata)
|
queue.metadata(new_meta=metadata)
|
||||||
@ -85,9 +83,7 @@ def queue_get(request, queue_name):
|
|||||||
|
|
||||||
|
|
||||||
def queue_subscribe(request, subscriber, ttl=None, options={}):
|
def queue_subscribe(request, subscriber, ttl=None, options={}):
|
||||||
"""Popup a modal form, user can input subscriber, ttl and options to
|
# Popup a modal form, user can input subscriber, ttl and options to
|
||||||
subscribe the queue.
|
# subscribe the queue.
|
||||||
|
# subscriber could be an URL or email address.
|
||||||
subscriber could be an URL or email address.
|
|
||||||
"""
|
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user