Skip to content

Commit 0b4aa56

Browse files
committed
Resolving all sphinx warnings and parse errors.
1 parent 8017d49 commit 0b4aa56

4 files changed

Lines changed: 26 additions & 16 deletions

File tree

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
# List of patterns, relative to source directory, that match files and
7171
# directories to ignore when looking for source files.
72-
exclude_patterns = ['_build']
72+
exclude_patterns = ['_build', '_components/*']
7373

7474
# The reST default role (used for this markup: `text`) to use for all documents.
7575
#default_role = None

docs/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
.. toctree::
44
:hidden:
55

6+
common-api
67
datastore-api
8+
datastore-getting-started
9+
datastore-quickstart
10+
getting-started
711
storage-api
8-
common-api
12+
storage-getting-started
13+
storage-quickstart
14+
915

1016
Google Cloud Python API
1117
=======================

gcloud/datastore/key.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
class Key(object):
99
"""
1010
An immutable representation of a datastore Key.
11+
12+
.. automethod:: __init__
1113
"""
1214

1315
def __init__(self, dataset=None, namespace=None, path=None):
@@ -52,7 +54,7 @@ def from_protobuf(cls, pb, dataset=None):
5254
5355
:type dataset: :class:`gcloud.datastore.dataset.Dataset`
5456
:param dataset: A dataset instance. If not passed, defaults to an
55-
instance whose ID is derived from pb.
57+
instance whose ID is derived from pb.
5658
5759
:rtype: :class:`gcloud.datastore.key.Key`
5860
:returns: a new `Key` instance
@@ -116,17 +118,18 @@ def to_protobuf(self):
116118
def from_path(cls, *args, **kwargs):
117119
"""Factory method for creating a key based on a path.
118120
119-
:type args: :class:`tuple
120-
:param args: sequence of even length, where the first of each
121-
pair is a string representing the 'kind' of the path element, and the
122-
second of the pair is either a string (for the path element's name)
123-
or an integer (for its id).
121+
:type args: :class:`tuple`
122+
:param args: sequence of even length, where the first of each pair is a
123+
string representing the 'kind' of the path element, and the
124+
second of the pair is either a string (for the path
125+
element's name) or an integer (for its id).
124126
125127
:type kwargs: :class:`dict`
126-
:param kwargs: Other named parameters which can be passed to `__init__()`.
128+
:param kwargs: Other named parameters which can be passed to
129+
:func:`Key.__init__`.
127130
128131
:rtype: :class:`gcloud.datastore.key.Key`
129-
:returns: a new `Key` instance
132+
:returns: a new :class:`Key` instance
130133
"""
131134
if len(args) % 2:
132135
raise ValueError('Must pass an even number of args.')
@@ -150,7 +153,7 @@ def is_partial(self):
150153
151154
:rtype: :class:`bool`
152155
:returns: True if the last element of the key's path does not have an 'id'
153-
or a 'name'.
156+
or a 'name'.
154157
"""
155158
return (self.id_or_name() is None)
156159

@@ -194,11 +197,11 @@ def path(self, path=None):
194197
195198
:type path: sequence of dicts
196199
:param path: Each dict must have keys 'kind' (a string) and optionally
197-
'name' (a string) or 'id' (an integer).
200+
'name' (a string) or 'id' (an integer).
198201
199202
:rtype: :class:`Key` (for setter); or :class:`str` (for getter)
200203
:returns: a new key, cloned from self., with the given path (setter);
201-
or self's path (getter).
204+
or self's path (getter).
202205
"""
203206
if path:
204207
clone = self._clone()
@@ -263,7 +266,7 @@ def id_or_name(self):
263266
264267
:rtype: :class:`int` (if 'id' is set); or :class:`str` (the 'name')
265268
:returns: True if the last element of the key's path has either an 'id'
266-
or a 'name'.
269+
or a 'name'.
267270
"""
268271
return self.id() or self.name()
269272

@@ -272,7 +275,8 @@ def parent(self): # pragma NO COVER
272275
273276
:rtype: :class:`gcloud.datastore.key.Key`
274277
:returns: a new `Key` instance, whose path consists of all but the last
275-
element of self's path. If self has only one path element, return None.
278+
element of self's path. If self has only one path element,
279+
return None.
276280
"""
277281
if len(self._path) <= 1:
278282
return None

gcloud/datastore/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def ancestor(self, ancestor):
148148
>>> query = dataset.query('Person')
149149
>>> filtered_query = query.ancestor(['Person', '1'])
150150
151-
Each call to ``.ancestor()`` returns a cloned :class:`Query:,
151+
Each call to ``.ancestor()`` returns a cloned :class:`Query`,
152152
however a query may only have one ancestor at a time.
153153
154154
:type ancestor: :class:`gcloud.datastore.key.Key` or list

0 commit comments

Comments
 (0)