Skip to content

Commit

Permalink
fix ruff's complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkennedy committed Feb 29, 2024
1 parent 8779b80 commit c82c8a0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions landsat/src/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
"""Lambda function to trigger low-latency Landsat processing from newly acquired scenes."""
import json


def process_scene(scene):
def process_scene(scene: str) -> None:
"""Process a Landsat scene."""
print(scene)


def lambda_handler(event, context):
def lambda_handler(event: dict, context: object) -> None:
"""Landsat processing lambda function.
Accepts an event with SQS records for newly ingested Landsat scenes and processes each scene.
Args:
event: The event dictionary that contains the parameters sent when this function is invoked.
context: The context in which is function is called.
"""
for record in event['Records']:
body = json.loads(record['body'])
message = json.loads(body['Message'])
Expand Down

0 comments on commit c82c8a0

Please sign in to comment.