Fix some reST field lists 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: Ia43fca7fab8a61860b2554bf28b9323d2de62448
This commit is contained in:
parent
03091f1c58
commit
09ee4abb40
@ -145,7 +145,7 @@ class Capabilities(object):
|
|||||||
defaults and overrides and provides the one structure that should be
|
defaults and overrides and provides the one structure that should be
|
||||||
used as the interface to controlling capabilities per datastore.
|
used as the interface to controlling capabilities per datastore.
|
||||||
|
|
||||||
:returns Capabilities:
|
:returns: Capabilities
|
||||||
"""
|
"""
|
||||||
self = cls(datastore_version_id)
|
self = cls(datastore_version_id)
|
||||||
self._load()
|
self._load()
|
||||||
@ -166,7 +166,7 @@ class BaseCapability(object):
|
|||||||
"""
|
"""
|
||||||
The capability's id
|
The capability's id
|
||||||
|
|
||||||
:returns str:
|
:returns: str
|
||||||
"""
|
"""
|
||||||
return self.db_info.id
|
return self.db_info.id
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ class BaseCapability(object):
|
|||||||
"""
|
"""
|
||||||
Is the capability/feature enabled?
|
Is the capability/feature enabled?
|
||||||
|
|
||||||
:returns bool:
|
:returns: bool
|
||||||
"""
|
"""
|
||||||
return self.db_info.enabled
|
return self.db_info.enabled
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ class CapabilityOverride(BaseCapability):
|
|||||||
"""
|
"""
|
||||||
The name of the capability.
|
The name of the capability.
|
||||||
|
|
||||||
:returns str:
|
:returns: str
|
||||||
"""
|
"""
|
||||||
return self.parent_name
|
return self.parent_name
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ class CapabilityOverride(BaseCapability):
|
|||||||
"""
|
"""
|
||||||
The description of the capability.
|
The description of the capability.
|
||||||
|
|
||||||
:returns str:
|
:returns: str
|
||||||
"""
|
"""
|
||||||
return self.parent_description
|
return self.parent_description
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ class CapabilityOverride(BaseCapability):
|
|||||||
Because capability overrides is an association table there are times
|
Because capability overrides is an association table there are times
|
||||||
where having the capability id is necessary.
|
where having the capability id is necessary.
|
||||||
|
|
||||||
:returns str:
|
:returns: str
|
||||||
"""
|
"""
|
||||||
return self.db_info.capability_id
|
return self.db_info.capability_id
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ class CapabilityOverride(BaseCapability):
|
|||||||
"""
|
"""
|
||||||
Generates a CapabilityOverride object from the capability_override id.
|
Generates a CapabilityOverride object from the capability_override id.
|
||||||
|
|
||||||
:returns CapabilityOverride:
|
:returns: CapabilityOverride
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return cls(DBCapabilityOverrides.find_by(
|
return cls(DBCapabilityOverrides.find_by(
|
||||||
@ -274,7 +274,7 @@ class CapabilityOverride(BaseCapability):
|
|||||||
override to.
|
override to.
|
||||||
:param enabled: Set enabled to True or False
|
:param enabled: Set enabled to True or False
|
||||||
|
|
||||||
:returns CapabilityOverride:
|
:returns: CapabilityOverride
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return CapabilityOverride(
|
return CapabilityOverride(
|
||||||
@ -291,7 +291,7 @@ class Capability(BaseCapability):
|
|||||||
"""
|
"""
|
||||||
The Capability name
|
The Capability name
|
||||||
|
|
||||||
:returns str:
|
:returns: str
|
||||||
"""
|
"""
|
||||||
return self.db_info.name
|
return self.db_info.name
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ class Capability(BaseCapability):
|
|||||||
"""
|
"""
|
||||||
The Capability description
|
The Capability description
|
||||||
|
|
||||||
:returns str:
|
:returns: str
|
||||||
"""
|
"""
|
||||||
return self.db_info.description
|
return self.db_info.description
|
||||||
|
|
||||||
@ -310,7 +310,7 @@ class Capability(BaseCapability):
|
|||||||
Generates a Capability object by looking up the capability first by
|
Generates a Capability object by looking up the capability first by
|
||||||
ID then by name.
|
ID then by name.
|
||||||
|
|
||||||
:returns Capability:
|
:returns: Capability
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return cls(DBCapabilities.find_by(id=capability_id_or_name))
|
return cls(DBCapabilities.find_by(id=capability_id_or_name))
|
||||||
@ -326,7 +326,7 @@ class Capability(BaseCapability):
|
|||||||
"""
|
"""
|
||||||
Creates a new capability.
|
Creates a new capability.
|
||||||
|
|
||||||
:returns Capability:
|
:returns: Capability
|
||||||
"""
|
"""
|
||||||
return Capability(DBCapabilities.create(
|
return Capability(DBCapabilities.create(
|
||||||
name=name, description=description, enabled=enabled))
|
name=name, description=description, enabled=enabled))
|
||||||
|
@ -30,7 +30,7 @@ class AuthProtocol(object):
|
|||||||
"""Convert header to wsgi env variable.
|
"""Convert header to wsgi env variable.
|
||||||
|
|
||||||
:param key: http header name (ex. 'X-Auth-Token')
|
:param key: http header name (ex. 'X-Auth-Token')
|
||||||
:return wsgi env variable name (ex. 'HTTP_X_AUTH_TOKEN')
|
:return: wsgi env variable name (ex. 'HTTP_X_AUTH_TOKEN')
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return 'HTTP_%s' % key.replace('-', '_').upper()
|
return 'HTTP_%s' % key.replace('-', '_').upper()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user