summaryrefslogtreecommitdiff
path: root/keystoneclient/_discover.py
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2014-10-12 19:11:39 -0500
committerBrant Knudson <bknudson@us.ibm.com>2014-10-15 12:24:52 -0500
commit3f1ba9f007528a7ddad7cb53ef75f7bb1026a4d1 (patch)
treee0f520f36ec6312e0cf3b3f417fcb197ebb1e490 /keystoneclient/_discover.py
parent8b267842a701970d4e1aae2f115afe4d73bc5ee6 (diff)
downloadpython-keystoneclient-3f1ba9f007528a7ddad7cb53ef75f7bb1026a4d1.tar.gz
Docstring cleanup for return type
The :returns: directive doesn't take an argument. To specify the return type, use the :rtype: directive. Change-Id: I3aaab824792333b3f75a10af92f5b712cc9b4ff6
Diffstat (limited to 'keystoneclient/_discover.py')
-rw-r--r--keystoneclient/_discover.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/keystoneclient/_discover.py b/keystoneclient/_discover.py
index 8816209..05e74d9 100644
--- a/keystoneclient/_discover.py
+++ b/keystoneclient/_discover.py
@@ -114,7 +114,8 @@ def version_match(required, candidate):
:param tuple required: the version that must be met.
:param tuple candidate: the version to test against required.
- :returns bool: True if candidate is suitable False otherwise.
+ :returns: True if candidate is suitable False otherwise.
+ :rtype: bool
"""
# major versions must be the same (e.g. even though v2 is a lower
# version than v3 we can't use it if v2 was requested)
@@ -151,8 +152,9 @@ class Discover(object):
:param bool allow_deprecated: Allow deprecated version endpoints.
:param bool allow_unknown: Allow endpoints with an unrecognised status.
- :returns list: The endpoints returned from the server that match the
- criteria.
+ :returns: The endpoints returned from the server that match the
+ criteria.
+ :rtype: list
"""
versions = []
for v in self._data:
@@ -183,13 +185,14 @@ class Discover(object):
Return version data in a structured way.
- :returns list(dict): A list of version data dictionaries sorted by
- version number. Each data element in the returned
- list is a dictionary consisting of at least:
+ :returns: A list of version data dictionaries sorted by version number.
+ Each data element in the returned list is a dictionary
+ consisting of at least:
:version tuple: The normalized version of the endpoint.
:url str: The url for the endpoint.
:raw_status str: The status as provided by the server
+ :rtype: list(dict)
"""
data = self.raw_version_data(**kwargs)
versions = []
@@ -239,9 +242,10 @@ class Discover(object):
same major release as there should be no compatibility issues with
using a version newer than the one asked for.
- :returns dict: the endpoint data for a URL that matches the required
- version (the format is described in version_data)
- or None if no match.
+ :returns: the endpoint data for a URL that matches the required version
+ (the format is described in version_data) or None if no
+ match.
+ :rtype: dict
"""
version = normalize_version_number(version)
version_data = self.version_data(**kwargs)
@@ -259,7 +263,8 @@ class Discover(object):
same major release as there should be no compatibility issues with
using a version newer than the one asked for.
- :returns str: The url for the specified version or None if no match.
+ :returns: The url for the specified version or None if no match.
+ :rtype: str
"""
data = self.data_for(version, **kwargs)
return data['url'] if data else None