Skip to content

Commit 2371581

Browse files
tswastcojenco
authored andcommitted
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 5e5330b commit 2371581

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

google/cloud/storage/blob.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def path_helper(bucket_path, blob_name):
115115
:type blob_name: string
116116
:param blob_name: The name of the blob.
117117
118-
:rtype: string
118+
:rtype: str
119119
:returns: The relative URL path for ``blob_name``.
120120
"""
121121
return bucket_path + '/o/' + quote(blob_name, safe='')
@@ -137,7 +137,7 @@ def __repr__(self):
137137
def path(self):
138138
"""Getter property for the URL path to this Blob.
139139
140-
:rtype: string
140+
:rtype: str
141141
:returns: The URL path to this Blob.
142142
"""
143143
if not self.name:
@@ -709,7 +709,7 @@ def rewrite(self, source, token=None, client=None):
709709
710710
If the property is not set locally, returns ``None``.
711711
712-
:rtype: string or ``NoneType``
712+
:rtype: str or ``NoneType``
713713
"""
714714

715715
content_disposition = _scalar_property('contentDisposition')
@@ -720,7 +720,7 @@ def rewrite(self, source, token=None, client=None):
720720
721721
If the property is not set locally, returns ``None``.
722722
723-
:rtype: string or ``NoneType``
723+
:rtype: str or ``NoneType``
724724
"""
725725

726726
content_encoding = _scalar_property('contentEncoding')
@@ -731,7 +731,7 @@ def rewrite(self, source, token=None, client=None):
731731
732732
If the property is not set locally, returns ``None``.
733733
734-
:rtype: string or ``NoneType``
734+
:rtype: str or ``NoneType``
735735
"""
736736

737737
content_language = _scalar_property('contentLanguage')
@@ -742,7 +742,7 @@ def rewrite(self, source, token=None, client=None):
742742
743743
If the property is not set locally, returns ``None``.
744744
745-
:rtype: string or ``NoneType``
745+
:rtype: str or ``NoneType``
746746
"""
747747

748748
content_type = _scalar_property('contentType')
@@ -753,7 +753,7 @@ def rewrite(self, source, token=None, client=None):
753753
754754
If the property is not set locally, returns ``None``.
755755
756-
:rtype: string or ``NoneType``
756+
:rtype: str or ``NoneType``
757757
"""
758758

759759
crc32c = _scalar_property('crc32c')
@@ -764,7 +764,7 @@ def rewrite(self, source, token=None, client=None):
764764
765765
If the property is not set locally, returns ``None``.
766766
767-
:rtype: string or ``NoneType``
767+
:rtype: str or ``NoneType``
768768
"""
769769

770770
@property
@@ -789,7 +789,7 @@ def etag(self):
789789
See: http://tools.ietf.org/html/rfc2616#section-3.11 and
790790
https://cloud.google.com/storage/docs/json_api/v1/objects
791791
792-
:rtype: string or ``NoneType``
792+
:rtype: str or ``NoneType``
793793
:returns: The blob etag or ``None`` if the property is not set locally.
794794
"""
795795
return self._properties.get('etag')
@@ -814,7 +814,7 @@ def id(self):
814814
815815
See: https://cloud.google.com/storage/docs/json_api/v1/objects
816816
817-
:rtype: string or ``NoneType``
817+
:rtype: str or ``NoneType``
818818
:returns: The ID of the blob or ``None`` if the property is not
819819
set locally.
820820
"""
@@ -828,7 +828,7 @@ def id(self):
828828
829829
If the property is not set locally, returns ``None``.
830830
831-
:rtype: string or ``NoneType``
831+
:rtype: str or ``NoneType``
832832
"""
833833

834834
@property
@@ -837,7 +837,7 @@ def media_link(self):
837837
838838
See: https://cloud.google.com/storage/docs/json_api/v1/objects
839839
840-
:rtype: string or ``NoneType``
840+
:rtype: str or ``NoneType``
841841
:returns: The media link for the blob or ``None`` if the property is
842842
not set locally.
843843
"""
@@ -898,7 +898,7 @@ def self_link(self):
898898
899899
See: https://cloud.google.com/storage/docs/json_api/v1/objects
900900
901-
:rtype: string or ``NoneType``
901+
:rtype: str or ``NoneType``
902902
:returns: The self link for the blob or ``None`` if the property is
903903
not set locally.
904904
"""
@@ -924,7 +924,7 @@ def storage_class(self):
924924
925925
See: https://cloud.google.com/storage/docs/storage-classes
926926
927-
:rtype: string or ``NoneType``
927+
:rtype: str or ``NoneType``
928928
:returns: If set, one of "MULTI_REGIONAL", "REGIONAL",
929929
"NEARLINE", "COLDLINE", "STANDARD", or
930930
"DURABLE_REDUCED_AVAILABILITY", else ``None``.

google/cloud/storage/bucket.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def path_helper(bucket_name):
193193
:type bucket_name: string
194194
:param bucket_name: The bucket name in the path.
195195
196-
:rtype: string
196+
:rtype: str
197197
:returns: The relative URL path for ``bucket_name``.
198198
"""
199199
return '/b/' + bucket_name
@@ -541,7 +541,7 @@ def etag(self):
541541
See: http://tools.ietf.org/html/rfc2616#section-3.11 and
542542
https://cloud.google.com/storage/docs/json_api/v1/buckets
543543
544-
:rtype: string or ``NoneType``
544+
:rtype: str or ``NoneType``
545545
:returns: The bucket etag or ``None`` if the property is not
546546
set locally.
547547
"""
@@ -553,7 +553,7 @@ def id(self):
553553
554554
See: https://cloud.google.com/storage/docs/json_api/v1/buckets
555555
556-
:rtype: string or ``NoneType``
556+
:rtype: str or ``NoneType``
557557
:returns: The ID of the bucket or ``None`` if the property is not
558558
set locally.
559559
"""
@@ -584,7 +584,7 @@ def lifecycle_rules(self, rules):
584584
585585
If the property is not set locally, returns ``None``.
586586
587-
:rtype: string or ``NoneType``
587+
:rtype: str or ``NoneType``
588588
"""
589589

590590
def get_logging(self):
@@ -666,7 +666,7 @@ def self_link(self):
666666
667667
See: https://cloud.google.com/storage/docs/json_api/v1/buckets
668668
669-
:rtype: string or ``NoneType``
669+
:rtype: str or ``NoneType``
670670
:returns: The self link for the bucket or ``None`` if the property is
671671
not set locally.
672672
"""
@@ -678,7 +678,7 @@ def storage_class(self):
678678
679679
See: https://cloud.google.com/storage/docs/storage-classes
680680
681-
:rtype: string or ``NoneType``
681+
:rtype: str or ``NoneType``
682682
:returns: If set, one of "MULTI_REGIONAL", "REGIONAL",
683683
"NEARLINE", "COLDLINE", "STANDARD", or
684684
"DURABLE_REDUCED_AVAILABILITY", else ``None``.

0 commit comments

Comments
 (0)