diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-12-02 01:46:24 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-12-02 01:46:24 +0000 |
commit | 41afe3c963fa01f61b67c44e572eee34b0972382 (patch) | |
tree | 0b01d3b087879c6a1135420df4040d7f67e3a9f1 /keystoneclient/_discover.py | |
parent | 4a49d970b06068b1ef26e7cc1f7dab3984da2ed4 (diff) | |
parent | 3f1ba9f007528a7ddad7cb53ef75f7bb1026a4d1 (diff) | |
download | python-keystoneclient-41afe3c963fa01f61b67c44e572eee34b0972382.tar.gz |
Merge "Docstring cleanup for return type"
Diffstat (limited to 'keystoneclient/_discover.py')
-rw-r--r-- | keystoneclient/_discover.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/keystoneclient/_discover.py b/keystoneclient/_discover.py index 9ecf616..07d0ae6 100644 --- a/keystoneclient/_discover.py +++ b/keystoneclient/_discover.py @@ -115,7 +115,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) @@ -152,8 +153,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: @@ -184,13 +186,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 = [] @@ -241,9 +244,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) @@ -261,7 +265,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 |