@@ -50,15 +50,15 @@ class Key(object):
5050 def __init__ (self , * path_args , ** kwargs ):
5151 """Constructor / initializer for a key.
5252
53- :type path_args: :class:` tuple` of :class:`str` and :class:`int`
53+ :type path_args: tuple of string and integer
5454 :param path_args: May represent a partial (odd length) or full (even
5555 length) key path.
5656
57- :type namespace: :class:`str`
57+ :type namespace: string
5858 :param namespace: A namespace identifier for the key. Can only be
5959 passed as a keyword argument.
6060
61- :type dataset_id: :class:`str`
61+ :type dataset_id: string
6262 :param dataset_id: The dataset ID associated with the key. Required,
6363 unless the implicit dataset ID has been set. Can
6464 only be passed as a keyword argument.
@@ -80,7 +80,7 @@ def __init__(self, *path_args, **kwargs):
8080 def _parse_path (path_args ):
8181 """Parses positional arguments into key path with kinds and IDs.
8282
83- :type path_args: :class:` tuple`
83+ :type path_args: tuple
8484 :param path_args: A tuple from positional arguments. Should be
8585 alternating list of kinds (string) and ID/name
8686 parts (int or string).
@@ -168,6 +168,9 @@ def _clone(self):
168168 def completed_key (self , id_or_name ):
169169 """Creates new key from existing partial key by adding final ID/name.
170170
171+ :type id_or_name: string or integer
172+ :param id_or_name: ID or name to be added to the key.
173+
171174 :rtype: :class:`gcloud.datastore.key.Key`
172175 :returns: A new ``Key`` instance with the same data as the current one
173176 and an extra ID or name added.
@@ -255,7 +258,7 @@ def delete(self, connection=None):
255258 def is_partial (self ):
256259 """Boolean indicating if the key has an ID (or name).
257260
258- :rtype: :class:`bool`
261+ :rtype: boolean
259262 :returns: ``True`` if the last element of the key's path does not have
260263 an ``id`` or a ``name``.
261264 """
@@ -265,7 +268,7 @@ def is_partial(self):
265268 def namespace (self ):
266269 """Namespace getter.
267270
268- :rtype: :class:`str`
271+ :rtype: string
269272 :returns: The namespace of the current key.
270273 """
271274 return self ._namespace
@@ -285,7 +288,7 @@ def path(self):
285288 def flat_path (self ):
286289 """Getter for the key path as a tuple.
287290
288- :rtype: :class:` tuple` of :class:`str` and :class:`int`
291+ :rtype: tuple of string and integer
289292 :returns: The tuple of elements in the path.
290293 """
291294 return self ._flat_path
@@ -294,7 +297,7 @@ def flat_path(self):
294297 def kind (self ):
295298 """Kind getter. Based on the last element of path.
296299
297- :rtype: :class:`str`
300+ :rtype: string
298301 :returns: The kind of the current key.
299302 """
300303 return self .path [- 1 ]['kind' ]
@@ -303,7 +306,7 @@ def kind(self):
303306 def id (self ):
304307 """ID getter. Based on the last element of path.
305308
306- :rtype: :class:`int`
309+ :rtype: integer
307310 :returns: The (integer) ID of the key.
308311 """
309312 return self .path [- 1 ].get ('id' )
@@ -312,7 +315,7 @@ def id(self):
312315 def name (self ):
313316 """Name getter. Based on the last element of path.
314317
315- :rtype: :class:`str`
318+ :rtype: string
316319 :returns: The (string) name of the key.
317320 """
318321 return self .path [- 1 ].get ('name' )
@@ -321,7 +324,7 @@ def name(self):
321324 def id_or_name (self ):
322325 """Getter. Based on the last element of path.
323326
324- :rtype: :class:`int` (if ``id``) or :class:`str` (if ``name``)
327+ :rtype: integer (if ``id``) or string (if ``name``)
325328 :returns: The last element of the key's path if it is either an ``id``
326329 or a ``name``.
327330 """
@@ -331,7 +334,7 @@ def id_or_name(self):
331334 def dataset_id (self ):
332335 """Dataset ID getter.
333336
334- :rtype: :class:`str`
337+ :rtype: string
335338 :returns: The key's dataset ID.
336339 """
337340 return self ._dataset_id
0 commit comments