Skip to content

Commit b7aa63b

Browse files
committed
Replace string with str in rtypes.
Used the command: ag -l 'rtype: string' | xargs sed -i .bak 's/rtype: string/rtype: str/g' Based on this comment: googleapis/google-cloud-python#2485 (comment) `str` is a type, `string` is a module.
1 parent 9468f56 commit b7aa63b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

google/cloud/datastore/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _determine_default_project(project=None):
5353
:type project: string
5454
:param project: Optional. The project to use as default.
5555
56-
:rtype: string or ``NoneType``
56+
:rtype: str or ``NoneType``
5757
:returns: Default project if it can be determined.
5858
"""
5959
if project is None:

google/cloud/datastore/connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _request(self, project, method, data):
7676
:param data: The data to send with the API call.
7777
Typically this is a serialized Protobuf string.
7878
79-
:rtype: string
79+
:rtype: str
8080
:returns: The string response content from the API call.
8181
:raises: :class:`google.cloud.exceptions.GoogleCloudError` if the
8282
response code is not 200 OK.

google/cloud/datastore/key.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def is_partial(self):
269269
def namespace(self):
270270
"""Namespace getter.
271271
272-
:rtype: string
272+
:rtype: str
273273
:returns: The namespace of the current key.
274274
"""
275275
return self._namespace
@@ -298,7 +298,7 @@ def flat_path(self):
298298
def kind(self):
299299
"""Kind getter. Based on the last element of path.
300300
301-
:rtype: string
301+
:rtype: str
302302
:returns: The kind of the current key.
303303
"""
304304
return self.path[-1]['kind']
@@ -316,7 +316,7 @@ def id(self):
316316
def name(self):
317317
"""Name getter. Based on the last element of path.
318318
319-
:rtype: string
319+
:rtype: str
320320
:returns: The (string) name of the key.
321321
"""
322322
return self.path[-1].get('name')
@@ -335,7 +335,7 @@ def id_or_name(self):
335335
def project(self):
336336
"""Project getter.
337337
338-
:rtype: string
338+
:rtype: str
339339
:returns: The key's project.
340340
"""
341341
return self._project
@@ -391,7 +391,7 @@ def _validate_project(project, parent):
391391
:type parent: :class:`google.cloud.datastore.key.Key` or ``NoneType``
392392
:param parent: The parent of the key or ``None``.
393393
394-
:rtype: string
394+
:rtype: str
395395
:returns: The ``project`` passed in, or implied from the environment.
396396
:raises: :class:`ValueError` if ``project`` is ``None`` and no project
397397
can be inferred from the parent.

google/cloud/datastore/query.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def project(self):
109109
def namespace(self):
110110
"""This query's namespace
111111
112-
:rtype: string or None
112+
:rtype: str or None
113113
:returns: the namespace assigned to this query
114114
"""
115115
return self._namespace or self._client.namespace
@@ -128,7 +128,7 @@ def namespace(self, value):
128128
def kind(self):
129129
"""Get the Kind of the Query.
130130
131-
:rtype: string
131+
:rtype: str
132132
:returns: The kind for the query.
133133
"""
134134
return self._kind

google/cloud/datastore/transaction.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def __init__(self, client):
100100
def id(self):
101101
"""Getter for the transaction ID.
102102
103-
:rtype: string
103+
:rtype: str
104104
:returns: The ID of the current transaction.
105105
"""
106106
return self._id

0 commit comments

Comments
 (0)