Skip to content

Commit 8a47536

Browse files
committed
reversed changes
1 parent a810e06 commit 8a47536

File tree

1 file changed

+3
-3
lines changed
  • functions-python/batch_process_dataset/src

1 file changed

+3
-3
lines changed

functions-python/batch_process_dataset/src/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import zipfile
2424
from dataclasses import dataclass
2525
from datetime import datetime
26-
from typing import Optional, Union
26+
from typing import Optional
2727

2828
import functions_framework
2929
from cloudevents.http import CloudEvent
@@ -140,7 +140,7 @@ def upload_file_to_storage(self, source_file_path, target_path):
140140
blob.make_public()
141141
return blob
142142

143-
def upload_dataset(self) -> Union[DatasetFile, None]:
143+
def upload_dataset(self) -> DatasetFile or None:
144144
"""
145145
Uploads a dataset to a GCP bucket as <feed_stable_id>/latest.zip and
146146
<feed_stable_id>/<feed_stable_id>-<upload_datetime>.zip
@@ -266,7 +266,7 @@ def create_dataset(self, dataset_file: DatasetFile, db_session: Session):
266266
except Exception as e:
267267
raise Exception(f"Error creating dataset: {e}")
268268

269-
def process(self) -> Union[DatasetFile, None]:
269+
def process(self) -> DatasetFile or None:
270270
"""
271271
Process the dataset and store new version in GCP bucket if any changes are detected
272272
:return: the file hash and the hosted url as a tuple or None if no upload is required

0 commit comments

Comments
 (0)