Skip to content

Commit 7cf2380

Browse files
committed
fix(storage): fix flake8 import order and address review comments
- Reordered imports in snippets_test.py to satisfy flake8. - Refactored storage_compose_file.py print statements to avoid duplication. [Generated-by: AI]
1 parent f9701b2 commit 7cf2380

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

storage/samples/snippets/snippets_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
import asyncio
1616
import io
1717
import os
18+
import sys
1819
import tempfile
1920
import time
2021
import uuid
21-
import sys
2222

2323
from google.cloud import storage
2424
import google.cloud.exceptions

storage/samples/snippets/storage_compose_file.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,16 @@ def compose_file(
5757
delete_source_objects=delete_source_objects,
5858
)
5959

60-
if delete_source_objects:
61-
print(
62-
"New composite object {} in the bucket {} was created by combining {} and {}. Source objects were deleted.".format(
63-
destination_blob_name, bucket_name, first_blob_name, second_blob_name
64-
)
65-
)
66-
else:
67-
print(
68-
"New composite object {} in the bucket {} was created by combining {} and {}".format(
69-
destination_blob_name, bucket_name, first_blob_name, second_blob_name
70-
)
60+
suffix = " Source objects were deleted." if delete_source_objects else ""
61+
print(
62+
"New composite object {} in the bucket {} was created by combining {} and {}.{}".format(
63+
destination_blob_name,
64+
bucket_name,
65+
first_blob_name,
66+
second_blob_name,
67+
suffix,
7168
)
69+
)
7270
return destination
7371

7472

0 commit comments

Comments
 (0)