From d11baf234d256f2a70ab89004e58ba16a02a72f9 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Wed, 7 Sep 2016 10:20:19 -0700 Subject: [PATCH] Updating some Sphinx class links. Follow-up to PR #2223. The Sphinx mechanism of using a `.` to mean "go find this class" can be confusing, so we make sure the `.` also is a relative path. --- google/cloud/datastore/batch.py | 2 +- google/cloud/datastore/client.py | 8 ++++---- google/cloud/streaming/exceptions.py | 4 ++-- google/cloud/streaming/http_wrapper.py | 7 +++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/google/cloud/datastore/batch.py b/google/cloud/datastore/batch.py index 756c3de5bd33..1d9eebd6d83e 100644 --- a/google/cloud/datastore/batch.py +++ b/google/cloud/datastore/batch.py @@ -290,7 +290,7 @@ def _assign_entity_to_pb(entity_pb, entity): Helper method for ``Batch.put``. - :type entity_pb: :class:`.datastore._generated.entity_pb2.Entity` + :type entity_pb: :class:`._generated.entity_pb2.Entity` :param entity_pb: The entity owned by a mutation. :type entity: :class:`google.cloud.datastore.entity.Entity` diff --git a/google/cloud/datastore/client.py b/google/cloud/datastore/client.py index f919666017f2..d8a47252d70e 100644 --- a/google/cloud/datastore/client.py +++ b/google/cloud/datastore/client.py @@ -78,7 +78,7 @@ def _extended_lookup(connection, project, key_pbs, :type project: string :param project: The project to make the request for. - :type key_pbs: list of :class:`.datastore._generated.entity_pb2.Key` + :type key_pbs: list of :class:`._generated.entity_pb2.Key` :param key_pbs: The keys to retrieve from the datastore. :type missing: list @@ -100,7 +100,7 @@ def _extended_lookup(connection, project, key_pbs, the given transaction. Incompatible with ``eventual==True``. - :rtype: list of :class:`.datastore._generated.entity_pb2.Entity` + :rtype: list of :class:`._generated.entity_pb2.Entity` :returns: The requested entities. :raises: :class:`ValueError` if missing / deferred are not null or empty list. @@ -245,7 +245,7 @@ def get(self, key, missing=None, deferred=None, transaction=None): :param deferred: (Optional) If a list is passed, the keys returned by the backend as "deferred" will be copied into it. - :type transaction: :class:`~.datastore.transaction.Transaction` + :type transaction: :class:`~.transaction.Transaction` :param transaction: (Optional) Transaction to use for read consistency. If not passed, uses current transaction, if set. @@ -273,7 +273,7 @@ def get_multi(self, keys, missing=None, deferred=None, transaction=None): by the backend as "deferred" will be copied into it. If the list is not empty, an error will occur. - :type transaction: :class:`~.datastore.transaction.Transaction` + :type transaction: :class:`~.transaction.Transaction` :param transaction: (Optional) Transaction to use for read consistency. If not passed, uses current transaction, if set. diff --git a/google/cloud/streaming/exceptions.py b/google/cloud/streaming/exceptions.py index 23ffa42995c2..52192e132be4 100644 --- a/google/cloud/streaming/exceptions.py +++ b/google/cloud/streaming/exceptions.py @@ -59,7 +59,7 @@ def status_code(self): def from_response(cls, http_response): """Factory: construct an exception from a response. - :type http_response: :class:`~.streaming.http_wrapper.Response` + :type http_response: :class:`~.http_wrapper.Response` :param http_response: the response which returned the error :rtype: :class:`HttpError` @@ -108,7 +108,7 @@ def __init__(self, response, content, url, retry_after): def from_response(cls, http_response): """Factory: construct an exception from a response. - :type http_response: :class:`~.streaming.http_wrapper.Response` + :type http_response: :class:`~.http_wrapper.Response` :param http_response: the response which returned the error. :rtype: :class:`RetryAfterError` diff --git a/google/cloud/streaming/http_wrapper.py b/google/cloud/streaming/http_wrapper.py index d1f4b8d3942e..2c3d63d0c3ce 100644 --- a/google/cloud/streaming/http_wrapper.py +++ b/google/cloud/streaming/http_wrapper.py @@ -273,10 +273,9 @@ def _check_response(response): :param response: the response to validate :raises: :exc:`google.cloud.streaming.exceptions.RequestError` if response - is None, :exc:`~.streaming.exceptions.BadStatusCodeError` if - response status code indicates an error, or - :exc:`~.streaming.exceptions.RetryAfterError` if response - indicates a retry interval. + is None, :exc:`~.exceptions.BadStatusCodeError` if response status + code indicates an error, or :exc:`~.exceptions.RetryAfterError` + if response indicates a retry interval. """ if response is None: # Caller shouldn't call us if the response is None, but handle anyway.