5050class Blob (_PropertyMixin ):
5151 """A wrapper around Cloud Storage's concept of an ``Object``.
5252
53- :type name: string
53+ :type name: str
5454 :param name: The name of the blob. This corresponds to the
5555 unique path of the object in the bucket.
5656
@@ -109,13 +109,13 @@ def chunk_size(self, value):
109109 def path_helper (bucket_path , blob_name ):
110110 """Relative URL path for a blob.
111111
112- :type bucket_path: string
112+ :type bucket_path: str
113113 :param bucket_path: The URL path for a bucket.
114114
115- :type blob_name: string
115+ :type blob_name: str
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 :
@@ -254,7 +254,7 @@ def exists(self, client=None):
254254 :param client: Optional. The client to use. If not passed, falls back
255255 to the ``client`` stored on the blob's bucket.
256256
257- :rtype: boolean
257+ :rtype: bool
258258 :returns: True if the blob exists in Cloud Storage.
259259 """
260260 client = self ._require_client (client )
@@ -355,7 +355,7 @@ def download_to_file(self, file_obj, client=None):
355355 def download_to_filename (self , filename , client = None ):
356356 """Download the contents of this blob into a named file.
357357
358- :type filename: string
358+ :type filename: str
359359 :param filename: A filename to be passed to ``open``.
360360
361361 :type client: :class:`~google.cloud.storage.client.Client` or
@@ -440,7 +440,7 @@ def upload_from_file(self, file_obj, rewind=False, size=None,
440440 :type file_obj: file
441441 :param file_obj: A file handle open for reading.
442442
443- :type rewind: boolean
443+ :type rewind: bool
444444 :param rewind: If True, seek to the beginning of the file handle before
445445 writing the file to Cloud Storage.
446446
@@ -450,7 +450,7 @@ def upload_from_file(self, file_obj, rewind=False, size=None,
450450 :func:`os.fstat`. (If the file handle is not from the
451451 filesystem this won't be possible.)
452452
453- :type content_type: string or ``NoneType``
453+ :type content_type: str or ``NoneType``
454454 :param content_type: Optional type of content being uploaded.
455455
456456 :type num_retries: integer
@@ -564,10 +564,10 @@ def upload_from_filename(self, filename, content_type=None, client=None):
564564 `lifecycle <https://cloud.google.com/storage/docs/lifecycle>`_
565565 API documents for details.
566566
567- :type filename: string
567+ :type filename: str
568568 :param filename: The path to the file.
569569
570- :type content_type: string or ``NoneType``
570+ :type content_type: str or ``NoneType``
571571 :param content_type: Optional type of content being uploaded.
572572
573573 :type client: :class:`~google.cloud.storage.client.Client` or
@@ -601,7 +601,7 @@ def upload_from_string(self, data, content_type='text/plain', client=None):
601601 :param data: The data to store in this blob. If the value is
602602 text, it will be encoded as UTF-8.
603603
604- :type content_type: string
604+ :type content_type: str
605605 :param content_type: Optional type of content being uploaded. Defaults
606606 to ``'text/plain'``.
607607
@@ -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``.
0 commit comments