From 44d8e863ffd56434d9e414774aaab0552258bf03 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Mon, 28 Mar 2016 12:12:37 -0400 Subject: [PATCH] Clean up docstring copy-pasta. --- gcloud/logging/_helpers.py | 2 +- gcloud/logging/client.py | 12 ++++++------ gcloud/logging/logger.py | 14 +++++++------- gcloud/logging/metric.py | 2 +- gcloud/logging/sink.py | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gcloud/logging/_helpers.py b/gcloud/logging/_helpers.py index aadd2aacdc52..8061abc2cd30 100644 --- a/gcloud/logging/_helpers.py +++ b/gcloud/logging/_helpers.py @@ -38,7 +38,7 @@ def logger_name_from_path(path, project): included for validation purposes. :rtype: string - :returns: Topic name parsed from ``path``. + :returns: Logger name parsed from ``path``. :raises: :class:`ValueError` if the ``path`` is ill-formed or if the project from the ``path`` does not agree with the ``project`` passed in. diff --git a/gcloud/logging/client.py b/gcloud/logging/client.py index afb7496db8a6..fd79d3100aa3 100644 --- a/gcloud/logging/client.py +++ b/gcloud/logging/client.py @@ -103,18 +103,18 @@ def list_entries(self, projects=None, filter_=None, order_by=None, :data:`gcloud.logging.DESCENDING`. :type page_size: int - :param page_size: maximum number of topics to return, If not passed, + :param page_size: maximum number of entries to return, If not passed, defaults to a value set by the API. :type page_token: string - :param page_token: opaque marker for the next "page" of topics. If not + :param page_token: opaque marker for the next "page" of entries. If not passed, the API will return the first page of - topics. + entries. :rtype: tuple, (list, str) :returns: list of :class:`gcloud.logging.entry.TextEntry`, plus a "next page token" string: if not None, indicates that - more topics can be retrieved with another call (pass that + more entries can be retrieved with another call (pass that value as ``page_token``). """ if projects is None: @@ -155,7 +155,7 @@ def sink(self, name, filter_, destination): :param destination: destination URI for the entries exported by the sink. - :rtype: :class:`gcloud.pubsub.sink.Sink` + :rtype: :class:`gcloud.logging.sink.Sink` :returns: Sink created with the current client. """ return Sink(name, filter_, destination, client=self) @@ -209,7 +209,7 @@ def metric(self, name, filter_, description=''): :type description: string :param description: the description of the metric to be constructed. - :rtype: :class:`gcloud.pubsub.metric.Metric` + :rtype: :class:`gcloud.logging.metric.Metric` :returns: Metric created with the current client. """ return Metric(name, filter_, client=self, description=description) diff --git a/gcloud/logging/logger.py b/gcloud/logging/logger.py index 26323f328811..2773c91f67d7 100644 --- a/gcloud/logging/logger.py +++ b/gcloud/logging/logger.py @@ -56,7 +56,7 @@ def _require_client(self, client): :type client: :class:`gcloud.logging.client.Client` or ``NoneType`` :param client: the client to use. If not passed, falls back to the - ``client`` stored on the current topic. + ``client`` stored on the current logger. :rtype: :class:`gcloud.logging.client.Client` :returns: The client passed in or the currently bound client. @@ -152,9 +152,9 @@ def delete(self, client=None): """API call: delete all entries in a logger via a DELETE request See: - https://cloud.google.com/pubsub/reference/rest/v1/projects.topics/delete + https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs/delete - :type client: :class:`gcloud.pubsub.client.Client` or ``NoneType`` + :type client: :class:`gcloud.logging.client.Client` or ``NoneType`` :param client: the client to use. If not passed, falls back to the ``client`` stored on the current logger. """ @@ -182,18 +182,18 @@ def list_entries(self, projects=None, filter_=None, order_by=None, :data:`gcloud.logging.DESCENDING`. :type page_size: int - :param page_size: maximum number of topics to return, If not passed, + :param page_size: maximum number of entries to return, If not passed, defaults to a value set by the API. :type page_token: string - :param page_token: opaque marker for the next "page" of topics. If not + :param page_token: opaque marker for the next "page" of entries. If not passed, the API will return the first page of - topics. + entries. :rtype: tuple, (list, str) :returns: list of :class:`gcloud.logging.entry.TextEntry`, plus a "next page token" string: if not None, indicates that - more topics can be retrieved with another call (pass that + more entries can be retrieved with another call (pass that value as ``page_token``). """ log_filter = 'logName:%s' % (self.name,) diff --git a/gcloud/logging/metric.py b/gcloud/logging/metric.py index 38b7e3ad3d04..34fa343ff53f 100644 --- a/gcloud/logging/metric.py +++ b/gcloud/logging/metric.py @@ -100,7 +100,7 @@ def from_api_repr(cls, resource, client): :type resource: dict :param resource: metric resource representation returned from the API - :type client: :class:`gcloud.pubsub.client.Client` + :type client: :class:`gcloud.logging.client.Client` :param client: Client which holds credentials and project configuration for the metric. diff --git a/gcloud/logging/sink.py b/gcloud/logging/sink.py index d7fb24fa98c9..49f651bfe905 100644 --- a/gcloud/logging/sink.py +++ b/gcloud/logging/sink.py @@ -97,7 +97,7 @@ def from_api_repr(cls, resource, client): :type resource: dict :param resource: sink resource representation returned from the API - :type client: :class:`gcloud.pubsub.client.Client` + :type client: :class:`gcloud.logging.client.Client` :param client: Client which holds credentials and project configuration for the sink.