Fix some format error in docstrings

Probably the most common format for documenting arguments is reST field
lists [1]. This change updates some docstrings to comply with the field
lists syntax.

[1] http://sphinx-doc.org/domains.html#info-field-lists

Change-Id: I133a7133d334476e1d50d17060ee696f4ee43f1c
This commit is contained in:
XieYingYun 2017-03-28 20:03:43 +08:00
parent 4c87ac6197
commit 17af7f1f37
3 changed files with 7 additions and 7 deletions

View File

@ -41,7 +41,7 @@ def get_list_table_columns_and_formatters(fields, objs, exclude_fields=(),
formatters is a dictionary specifies how to display the value
of the field.
They can be [], {}.
:raise: dragonflow.common.exceptions.CommandError.
:raise dragonflow.common.exceptions.CommandError:
"""
if objs and isinstance(objs, list):

View File

@ -71,7 +71,7 @@ class DbApi(object):
:param topic: topic for key
:type topic: string
:returns: string - the key value
:raises: DragonflowException.DBKeyNotFound if key not found
:raises DragonflowException.DBKeyNotFound: if key not found
"""
@abc.abstractmethod
@ -87,7 +87,7 @@ class DbApi(object):
:param topic: topic for key
:type topic: string
:returns: None
:raises: DragonflowException.DBKeyNotFound if key not found
:raises DragonflowException.DBKeyNotFound: if key not found
"""
@abc.abstractmethod
@ -116,7 +116,7 @@ class DbApi(object):
:param topic: topic for key
:type topic: string
:returns: None
:raises: DragonflowException.DBKeyNotFound if key not found
:raises DragonflowException.DBKeyNotFound: if key not found
"""
@abc.abstractmethod
@ -128,7 +128,7 @@ class DbApi(object):
:param topic: get only entries matching this topic
:type topic: string
:returns: list of values
:raises: DragonflowException.DBKeyNotFound if key not found
:raises DragonflowException.DBKeyNotFound: if key not found
"""
@abc.abstractmethod
@ -140,7 +140,7 @@ class DbApi(object):
:param topic: get all keys matching this topic
:type topic: string
:returns: list of keys
:raises: DragonflowException.DBKeyNotFound if key not found
:raises DragonflowException.DBKeyNotFound: if key not found
"""
@abc.abstractmethod

View File

@ -204,7 +204,7 @@ def _lock_free_update(session, uuid, lock_state=False, session_id=0):
:type lock_state: boolean
:param session_id: the API session ID to update
:type session_id: string
:raises: RetryRequest() when the lock failed to update
:raises RetryRequest(): when the lock failed to update
"""
if not lock_state:
# acquire lock