From 9ed4faf9bcf6ca3c0382bf283da8fb1616487849 Mon Sep 17 00:00:00 2001 From: Paul Fouquet Date: Thu, 19 Dec 2024 09:48:58 +1300 Subject: [PATCH] refactor: rename stac dict variable in ImageryItem.from_file() --- scripts/stac/imagery/item.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/stac/imagery/item.py b/scripts/stac/imagery/item.py index 8a9f46dc..ad9ce2b2 100644 --- a/scripts/stac/imagery/item.py +++ b/scripts/stac/imagery/item.py @@ -50,15 +50,15 @@ def from_file(cls, file_name: str) -> "ImageryItem": ImageryItem: The new ImageryItem. """ file_content = read(file_name) - stac_dict_from_s3 = json.loads(file_content.decode("UTF-8")) - if (bbox := stac_dict_from_s3.get("bbox")) is not None: - stac_dict_from_s3["bbox"] = tuple(bbox) + stac_dict_from_file = json.loads(file_content.decode("UTF-8")) + if (bbox := stac_dict_from_file.get("bbox")) is not None: + stac_dict_from_file["bbox"] = tuple(bbox) new_item = cls( - id_=stac_dict_from_s3["id"], - stac_asset=stac_dict_from_s3["assets"]["visual"], - stac_processing=stac_dict_from_s3["properties"], + id_=stac_dict_from_file["id"], + stac_asset=stac_dict_from_file["assets"]["visual"], + stac_processing=stac_dict_from_file["properties"], ) - new_item.stac = stac_dict_from_s3 + new_item.stac = stac_dict_from_file return new_item