Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
docs: update async_detect_document() sample (#260)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
kweinmeister and parthea authored Oct 26, 2021
1 parent d5fb6df commit b044537
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions samples/snippets/detect/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,9 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri):

bucket = storage_client.get_bucket(bucket_name)

# List objects with the given prefix.
blob_list = list(bucket.list_blobs(prefix=prefix))
# List objects with the given prefix, filtering out folders.
blob_list = [blob for blob in list(bucket.list_blobs(
prefix=prefix)) if not blob.name.endswith('/')]
print('Output files:')
for blob in blob_list:
print(blob.name)
Expand Down

0 comments on commit b044537

Please sign in to comment.