Skip to content

Commit 432c68b

Browse files
committed
Fix parameter alignment in CustomStorage method calls
Align continuation parameters under the opening parenthesis of PutObject, SearchObjects, and GetObject calls to match Python convention and the pre-existing style in this codebase.
1 parent e567a15 commit 432c68b

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

functions/csv-import/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ def _process_batch(batch_context: Dict[str, Any]) -> Dict[str, int]:
268268
for record in batch:
269269
try:
270270
response = custom_storage.PutObject(body=record,
271-
collection_name=collection_name,
272-
object_key=record["event_id"])
271+
collection_name=collection_name,
272+
object_key=record["event_id"])
273273

274274
if response["status_code"] == 200:
275275
success_count += 1

functions/log-event/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def on_post(request: Request) -> Response:
5252
collection_name = "event_logs"
5353

5454
response = custom_storage.PutObject(body=json_data,
55-
collection_name=collection_name,
56-
object_key=event_id)
55+
collection_name=collection_name,
56+
object_key=event_id)
5757

5858
if response["status_code"] != 200:
5959
error_message = response.get("error", {}).get("message", "Unknown error")
@@ -67,8 +67,8 @@ def on_post(request: Request) -> Response:
6767

6868
# Query the collection to retrieve the event by id
6969
query_response = custom_storage.SearchObjects(filter=f"event_id:'{event_id}'",
70-
collection_name=collection_name,
71-
limit=5)
70+
collection_name=collection_name,
71+
limit=5)
7272

7373
return Response(
7474
body={

functions/process-events/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ def _get_checkpoint(workflow_context: Dict[str, Any]) -> Dict[str, Any]:
8484

8585
# Retrieve the most recent checkpoint for this workflow
8686
checkpoint_response = custom_storage.SearchObjects(filter=f"workflow_id:'{workflow_id}'",
87-
collection_name=checkpoint_collection,
88-
sort="last_processed_timestamp.desc",
89-
limit=1)
87+
collection_name=checkpoint_collection,
88+
sort="last_processed_timestamp.desc",
89+
limit=1)
9090

9191
logger.debug(f"checkpoint response: {checkpoint_response}")
9292

@@ -98,7 +98,7 @@ def _get_checkpoint(workflow_context: Dict[str, Any]) -> Dict[str, Any]:
9898

9999
# SearchObjects returns metadata, not actual objects, so use GetObject for details
100100
object_details = custom_storage.GetObject(collection_name=checkpoint_collection,
101-
object_key=last_checkpoint["object_key"])
101+
object_key=last_checkpoint["object_key"])
102102

103103
# GetObject returns bytes; convert to JSON
104104
json_response = json.loads(object_details.decode("utf-8"))
@@ -142,8 +142,8 @@ def _process_and_update(workflow_context: Dict[str, Any], checkpoint_data: Dict[
142142
logger.debug(f"Sending data to PutObject: {checkpoint_update}")
143143

144144
custom_storage.PutObject(body=checkpoint_update,
145-
collection_name=checkpoint_collection,
146-
object_key=f"checkpoint_{workflow_id}")
145+
collection_name=checkpoint_collection,
146+
object_key=f"checkpoint_{workflow_id}")
147147

148148
return Response(
149149
body={

0 commit comments

Comments
 (0)