From b4bf54f62f1ee3286a2270a3d05808bd1a14dedd Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Wed, 1 Oct 2014 16:56:38 -0700 Subject: [PATCH] Fixing remaining PEP8 long line issues. --- gcloud/datastore/__init__.py | 5 ++++- gcloud/datastore/entity.py | 4 ++-- gcloud/datastore/query.py | 4 ++-- gcloud/storage/acl.py | 2 +- gcloud/storage/bucket.py | 2 +- gcloud/storage/iterator.py | 4 ++-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/gcloud/datastore/__init__.py b/gcloud/datastore/__init__.py index 0de26dddcb2eb..5d663e95c24cb 100644 --- a/gcloud/datastore/__init__.py +++ b/gcloud/datastore/__init__.py @@ -71,7 +71,10 @@ def get_connection(client_email, private_key_path): def get_dataset(dataset_id, client_email, private_key_path): - """Shortcut method to establish a connection to a particular dataset in the Cloud Datastore. + """Establish a connection to a particular dataset in the Cloud Datastore. + + This is a shortcut method for creating a connection and using it + to connect to a dataset. You'll generally use this as the first call to working with the API: diff --git a/gcloud/datastore/entity.py b/gcloud/datastore/entity.py index 5ffdb6122f22f..daec9d08ce5f1 100644 --- a/gcloud/datastore/entity.py +++ b/gcloud/datastore/entity.py @@ -71,7 +71,7 @@ def __init__(self, dataset=None, kind=None): self._key = None def dataset(self): - """Get the :class:`gcloud.datastore.dataset.Dataset` in which this entity belongs. + """Get the :class:`.dataset.Dataset` in which this entity belongs. .. note:: This is based on the :class:`gcloud.datastore.key.Key` set on the entity. @@ -119,7 +119,7 @@ def kind(self): @classmethod def from_key(cls, key): - """Factory method for creating an entity based on the :class:`gcloud.datastore.key.Key`. + """Factory method for creating entity based on :class:`.datastore.key.Key`. :type key: :class:`gcloud.datastore.key.Key` :param key: The key for the entity. diff --git a/gcloud/datastore/query.py b/gcloud/datastore/query.py index bf8b5a00e816c..5ff1c98241fc6 100644 --- a/gcloud/datastore/query.py +++ b/gcloud/datastore/query.py @@ -63,9 +63,9 @@ def _clone(self): return clone def to_protobuf(self): - """Convert the :class:`Query` instance to a :class:`gcloud.datastore.datastore_v1_pb2.Query`. + """Convert :class:`Query` instance to :class:`.datastore_v1_pb2.Query`. - :rtype: :class:`gclouddatstore.datastore_v1_pb2.Query` + :rtype: :class:`gcloud.datastore.datastore_v1_pb2.Query` :returns: A Query protobuf that can be sent to the protobuf API. """ return self._pb diff --git a/gcloud/storage/acl.py b/gcloud/storage/acl.py index 3c873bcaecc08..4b2fad241441d 100644 --- a/gcloud/storage/acl.py +++ b/gcloud/storage/acl.py @@ -379,7 +379,7 @@ def save(self): class DefaultObjectACL(BucketACL): - """A subclass of BucketACL representing the default object ACL for a bucket.""" + """A class of representing the default object ACL for a bucket.""" def save(self): """Save this ACL as the default object ACL for the current bucket.""" diff --git a/gcloud/storage/bucket.py b/gcloud/storage/bucket.py index 13567416e7f23..a6e98256744b9 100644 --- a/gcloud/storage/bucket.py +++ b/gcloud/storage/bucket.py @@ -104,7 +104,7 @@ def get_all_keys(self): return list(self) def new_key(self, key): - """Given a path name (or a Key), return a :class:`gcloud.storage.key.Key` object. + """Given a path name (or Key), return a :class:`.storage.key.Key` object. This is really useful when you're not sure if you have a Key object or a string path name. diff --git a/gcloud/storage/iterator.py b/gcloud/storage/iterator.py index a3c83db4a8690..25e4d1c841263 100644 --- a/gcloud/storage/iterator.py +++ b/gcloud/storage/iterator.py @@ -146,7 +146,7 @@ def __init__(self, connection): super(BucketIterator, self).__init__(connection=connection, path='/b') def get_items_from_response(self, response): - """Factory method which yields :class:`gcloud.storage.bucket.Bucket` items from a response. + """Factory method which yields :class:`.Bucket` items from a response. :type response: dict :param response: The JSON API response for a page of buckets. @@ -174,7 +174,7 @@ def __init__(self, bucket): connection=bucket.connection, path=bucket.path + '/o') def get_items_from_response(self, response): - """Factory method which yields :class:`gcloud.storage.key.Key` items from a response. + """Factory method, yields :class:`.storage.key.Key` items from response. :type response: dict :param response: The JSON API response for a page of keys.