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:
shu-mutou 2016-02-05 11:23:22 +09:00
parent e19fc3bd54
commit 14f41fb1a3
3 changed files with 13 additions and 22 deletions

View File

@ -59,8 +59,6 @@ downloadcache = ~/cache/pip
[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]

View File

@ -22,21 +22,18 @@ from openstack_dashboard.api.rest import utils as rest_utils
@urls.register
class Queue(generic.View):
"""API for retrieving a single queue
"""
"""API for retrieving a single queue"""
url_regex = r'zaqar/queues/(?P<queue_name>[^/]+)$'
@rest_utils.ajax()
def get(self, request, queue_name):
"""Get a specific queue
"""
"""Get a specific queue"""
return zaqar.queue_show(request, queue_name).to_dict()
@urls.register
class Queues(generic.View):
"""API for queues
"""
"""API for queues"""
url_regex = r'zaqar/queues/$'
@rest_utils.ajax()

View File

@ -55,12 +55,11 @@ def queue_list(request, limit=None, marker=None):
def queue_create(request, queue_name, metadata):
"""Pop up a modal form, which contains several inputbox:
1. queue_name
2. ttl
3. max message size
4. Metadata
"""
# Pop up a modal form, which contains several inputbox:
# 1. queue_name
# 2. ttl
# 3. max message size
# 4. Metadata
queue = zaqarclient(request).queue(queue_name, force_create=True)
queue.metadata(new_meta=metadata)
@ -72,9 +71,8 @@ def queue_delete(request, queue_name):
def queue_update(request, queue_name, metadata):
"""Popup a modal form, the queue name is a realonly label or inputbox.
user can change ttl, max message size and metadata
"""
# Popup a modal form, the queue name is a realonly label or inputbox.
# user can change ttl, max message size and metadata
queue = zaqarclient(request).queue(queue_name, auto_create=False)
queue.metadata(new_meta=metadata)
@ -85,9 +83,7 @@ def queue_get(request, queue_name):
def queue_subscribe(request, subscriber, ttl=None, options={}):
"""Popup a modal form, user can input subscriber, ttl and options to
subscribe the queue.
subscriber could be an URL or email address.
"""
# Popup a modal form, user can input subscriber, ttl and options to
# subscribe the queue.
# subscriber could be an URL or email address.
pass