diff --git a/keystoneclient/_discover.py b/keystoneclient/_discover.py index c9c979287..88162095c 100644 --- a/keystoneclient/_discover.py +++ b/keystoneclient/_discover.py @@ -291,7 +291,8 @@ class _VersionHacks(object): :param str service_type: the service_type to look up. :param str url: The original url that came from a service_catalog. - :return: Either the unversioned url or the one from the catalog to try. + :returns: Either the unversioned url or the one from the catalog + to try. """ for old, new in self._discovery_data.get(service_type, []): new_string, number_of_subs_made = old.subn(new, url) @@ -313,6 +314,6 @@ def get_catalog_discover_hack(service_type, url): :param str service_type: the service_type to look up. :param str url: The original url that came from a service_catalog. - :return: Either the unversioned url or the one from the catalog to try. + :returns: Either the unversioned url or the one from the catalog to try. """ return _VERSION_HACKS.get_discover_hack(service_type, url) diff --git a/keystoneclient/access.py b/keystoneclient/access.py index 1f2affae1..2dda12a7e 100644 --- a/keystoneclient/access.py +++ b/keystoneclient/access.py @@ -83,7 +83,7 @@ class AccessInfo(dict): def will_expire_soon(self, stale_duration=None): """Determines if expiration is about to occur. - :return: boolean : true if expiration is within the given duration + :returns: boolean : true if expiration is within the given duration """ stale_duration = (STALE_TOKEN_DURATION if stale_duration is None @@ -100,7 +100,7 @@ class AccessInfo(dict): """Determines if processing v2 or v3 token given a successful auth body or a user-provided dict. - :return: boolean : true if auth body matches implementing class + :returns: boolean : true if auth body matches implementing class """ raise NotImplementedError() diff --git a/keystoneclient/auth/identity/base.py b/keystoneclient/auth/identity/base.py index 10a9fe81a..a58de2a63 100644 --- a/keystoneclient/auth/identity/base.py +++ b/keystoneclient/auth/identity/base.py @@ -243,7 +243,7 @@ class BaseIdentityPlugin(base.BaseAuthPlugin): :raises: DiscoveryFailure if for some reason the lookup fails. :raises: HttpError An error from an invalid HTTP response. - :return: A discovery object with the results of looking up that URL. + :returns: A discovery object with the results of looking up that URL. """ # NOTE(jamielennox): we want to cache endpoints on the session as well # so that they maintain sharing between auth plugins. Create a cache on diff --git a/keystoneclient/contrib/auth/v3/saml2.py b/keystoneclient/contrib/auth/v3/saml2.py index c9eedac52..4ff0ef7e8 100644 --- a/keystoneclient/contrib/auth/v3/saml2.py +++ b/keystoneclient/contrib/auth/v3/saml2.py @@ -518,7 +518,7 @@ class ADFSUnscopedToken(_BaseSAMLPlugin): and let Python raise the AttributeError. :param session - :return: True if cookie jar is nonempty, False otherwise + :returns: True if cookie jar is nonempty, False otherwise :raises: AttributeError in case cookies are not find anywhere """ diff --git a/keystoneclient/middleware/auth_token.py b/keystoneclient/middleware/auth_token.py index 64a4a98e0..bb1e041d2 100644 --- a/keystoneclient/middleware/auth_token.py +++ b/keystoneclient/middleware/auth_token.py @@ -1110,7 +1110,7 @@ class AuthProtocol(object): :param retry: flag that forces the middleware to retry user authentication when an indeterminate response is received. Optional. - :return: token object received from keystone on success + :returns: token object received from keystone on success :raise InvalidUserToken: if token is rejected :raise ServiceError: if unable to authenticate token diff --git a/keystoneclient/openstack/common/timeutils.py b/keystoneclient/openstack/common/timeutils.py index c48da95f1..49d8287bd 100644 --- a/keystoneclient/openstack/common/timeutils.py +++ b/keystoneclient/openstack/common/timeutils.py @@ -204,7 +204,7 @@ def is_soon(dt, window): :param dt: the time :param window: minimum seconds to remain to consider the time not soon - :return: True if expiration is within the given duration + :returns: True if expiration is within the given duration """ soon = (utcnow() + datetime.timedelta(seconds=window)) return normalize_time(dt) <= soon diff --git a/keystoneclient/tests/generic/test_shell.py b/keystoneclient/tests/generic/test_shell.py index e30b056e8..194c5b2d9 100644 --- a/keystoneclient/tests/generic/test_shell.py +++ b/keystoneclient/tests/generic/test_shell.py @@ -48,7 +48,7 @@ class DoDiscoverTest(utils.TestCase): def _execute_discover(self): """Call do_discover function and capture output - :return: captured output is returned + :returns: captured output is returned """ with mock.patch('sys.stdout', new_callable=moves.StringIO) as mock_stdout: