Skip to content

Commit c53d8cf

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 f93154f commit c53d8cf

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

google/cloud/_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ def _pb_timestamp_to_rfc3339(timestamp_pb):
526526
:type timestamp_pb: :class:`google.protobuf.timestamp_pb2.Timestamp`
527527
:param timestamp_pb: A Google returned timestamp protobuf.
528528
529-
:rtype: string
529+
:rtype: str
530530
:returns: An RFC 3339 formatted timestamp string.
531531
"""
532532
timestamp = _pb_timestamp_to_datetime(timestamp_pb)

google/cloud/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def build_api_url(cls, path, query_params=None,
179179
Typically you shouldn't provide this and instead
180180
use the default for the library.
181181
182-
:rtype: string
182+
:rtype: str
183183
:returns: The URL assembled from the pieces provided.
184184
"""
185185
url = cls.API_URL_TEMPLATE.format(

google/cloud/credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def generate_signed_url(credentials, resource, expiration,
220220
:param generation: (Optional) A value that indicates which generation of
221221
the resource to fetch.
222222
223-
:rtype: string
223+
:rtype: str
224224
:returns: A signed URL you can use to access the resource
225225
until expiration.
226226
"""

google/cloud/streaming/transfer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def stream(self):
163163
def url(self):
164164
"""URL to / from which data is downloaded/uploaded.
165165
166-
:rtype: string
166+
:rtype: str
167167
:returns: The URL where data is sent/received.
168168
"""
169169
return self._url
@@ -318,7 +318,7 @@ def total_size(self):
318318
def encoding(self):
319319
"""'Content-Encoding' used to transfer the file
320320
321-
:rtype: string or None
321+
:rtype: str or None
322322
:returns: The encoding of the downloaded content.
323323
"""
324324
return self._encoding
@@ -732,7 +732,7 @@ def complete(self):
732732
def mime_type(self):
733733
"""MIMEtype of the file being uploaded.
734734
735-
:rtype: string
735+
:rtype: str
736736
:returns: The mime-type of the upload.
737737
"""
738738
return self._mime_type
@@ -750,7 +750,7 @@ def progress(self):
750750
def strategy(self):
751751
"""Upload strategy to use
752752
753-
:rtype: string or None
753+
:rtype: str or None
754754
:returns: The strategy used to upload the data.
755755
"""
756756
return self._strategy
@@ -972,7 +972,7 @@ def _get_range_header(response):
972972
:type response: :class:`google.cloud.streaming.http_wrapper.Response`
973973
:param response: response to be queried
974974
975-
:rtype: string
975+
:rtype: str
976976
:returns: The header used to determine the bytes range.
977977
"""
978978
# NOTE: Per RFC 2616[1]/7233[2][3], 'Range' is a request header,

0 commit comments

Comments
 (0)