@@ -1754,7 +1754,9 @@ def _do_multipart_upload(
17541754 upload_url = _add_query_parameters (base_url , name_value_pairs )
17551755 upload = MultipartUpload (upload_url , headers = headers , checksum = checksum )
17561756
1757- upload ._retry_strategy = _api_core_retry_to_resumable_media_retry (retry , num_retries )
1757+ upload ._retry_strategy = _api_core_retry_to_resumable_media_retry (
1758+ retry , num_retries
1759+ )
17581760
17591761 response = upload .transmit (
17601762 transport , data , object_metadata , content_type , timeout = timeout
@@ -1936,7 +1938,9 @@ def _initiate_resumable_upload(
19361938 upload_url , chunk_size , headers = headers , checksum = checksum
19371939 )
19381940
1939- upload ._retry_strategy = _api_core_retry_to_resumable_media_retry (retry , num_retries )
1941+ upload ._retry_strategy = _api_core_retry_to_resumable_media_retry (
1942+ retry , num_retries
1943+ )
19401944
19411945 upload .initiate (
19421946 transport ,
@@ -2092,7 +2096,7 @@ def _do_upload(
20922096 if_metageneration_not_match ,
20932097 timeout = _DEFAULT_TIMEOUT ,
20942098 checksum = None ,
2095- retry = None
2099+ retry = None ,
20962100 ):
20972101 """Determine an upload strategy and then perform the upload.
20982102
@@ -2192,7 +2196,10 @@ def _do_upload(
21922196 # arguments into query_params dictionaries. Media operations work
21932197 # differently, so here we make a "fake" query_params to feed to the
21942198 # ConditionalRetryPolicy.
2195- query_params = {"ifGenerationMatch" : if_generation_match , "ifMetagenerationMatch" : if_metageneration_match }
2199+ query_params = {
2200+ "ifGenerationMatch" : if_generation_match ,
2201+ "ifMetagenerationMatch" : if_metageneration_match ,
2202+ }
21962203 retry = retry .get_retry_policy_if_conditions_met (query_params = query_params )
21972204
21982205 if size is not None and size <= _MAX_MULTIPART_SIZE :
@@ -2395,7 +2402,7 @@ def upload_from_file(
23952402 if_metageneration_not_match ,
23962403 timeout = timeout ,
23972404 checksum = checksum ,
2398- retry = retry
2405+ retry = retry ,
23992406 )
24002407 self ._set_properties (created_json )
24012408 except resumable_media .InvalidResponse as exc :
@@ -3524,7 +3531,7 @@ def open(
35243531 "retry". For uploads only, the following additional arguments are
35253532 supported: "content_type", "num_retries", "predefined_acl",
35263533 "checksum". "num_retries" is supported for backwards-compatibility
3527- reasons only; please use "retry" with a Retry object or
3534+ reasons only; please use "retry" with a Retry object or
35283535 ConditionalRetryPolicy instead.
35293536
35303537 :returns: A 'BlobReader' or 'BlobWriter' from
0 commit comments