Skip to content

Commit 8c69855

Browse files
ruff fixes
1 parent 5300db0 commit 8c69855

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

batchee/harmony/service_adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def process_catalog(self, catalog: pystac.Catalog) -> list[pystac.Catalog]:
101101

102102
# --- Construct a dictionary with a separate key for each batch ---
103103
grouped: dict[int, list[Item]] = {}
104-
for k, v in zip(batch_indices, items):
104+
for k, v in zip(batch_indices, items, strict=False):
105105
grouped.setdefault(k, []).append(v)
106106

107107
# --- Construct a list of STAC Catalogs (which represent each TEMPO scan),
@@ -115,7 +115,7 @@ def process_catalog(self, catalog: pystac.Catalog) -> list[pystac.Catalog]:
115115
batch_catalog.clear_children()
116116
batch_catalog.clear_items()
117117

118-
for idx, item in enumerate(batch_items):
118+
for _, item in enumerate(batch_items):
119119
# Construct a new pystac.Item for each granule in the batch
120120
output_item = Item(
121121
str(uuid4()),

batchee/tempo_filename_parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@
4747
r"(?P<granule_id>G[0-9]{2}).*\.nc"
4848
)
4949

50+
DEFAULT_TIMEZONE = ZoneInfo("UTC")
51+
5052

5153
def get_day_in_us_central(
52-
day_in_granule: str, time_in_granule: str, assume_tz=ZoneInfo("UTC")
54+
day_in_granule: str, time_in_granule: str, assume_tz=DEFAULT_TIMEZONE
5355
) -> str:
5456
"""
5557
Convert a datetime to US Central time (US/Central) and return
@@ -144,7 +146,7 @@ def main() -> list[list[str]]:
144146

145147
# --- Construct a STAC object based on the batch indices ---
146148
grouped: dict[int, list[str]] = {}
147-
for k, v in zip(batch_indices, input_filenames):
149+
for k, v in zip(batch_indices, input_filenames, strict=False):
148150
grouped.setdefault(k, []).append(v)
149151
grouped_names: list[list[str]] = [grouped[k] for k in unique_category_indices]
150152

0 commit comments

Comments
 (0)