Skip to content

Commit

Permalink
ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
asjohnston-asf committed Mar 6, 2024
1 parent a8797fe commit 4209538
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions landsat/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,17 @@ def _search_date(date_string: str) -> datetime:


def _qualifies_for_processing(item: pystac.item.Item, max_cloud_cover: int = MAX_CLOUD_COVER_PERCENT) -> bool:
return item.collection_id == 'landsat-c2l1' and \
'OLI' in item.properties['instruments'] and \
item.properties['landsat:collection_category'] in ['T1', 'T2'] and \
item.properties['eo:cloud_cover'] < max_cloud_cover and \
item.properties['view:off_nadir'] == 0 and \
item.properties['landsat:wrs_path'] + item.properties['landsat:wrs_row'] in LANDSAT_TILES_TO_PROCESS
return (
item.collection_id == 'landsat-c2l1'
and 'OLI' in item.properties['instruments']
and item.properties['landsat:collection_category'] in ['T1', 'T2']
and item.properties['landsat:wrs_path'] + item.properties['landsat:wrs_row'] in LANDSAT_TILES_TO_PROCESS
and item.properties['eo:cloud_cover'] < max_cloud_cover
and item.properties['view:off_nadir'] == 0
)


def _check_scene(scene: str, max_cloud_cover: int = MAX_CLOUD_COVER_PERCENT) -> None:
def _check_scene(scene: str, max_cloud_cover: int = MAX_CLOUD_COVER_PERCENT) -> None:
collection = LANDSAT_CATALOG.get_collection(LANDSAT_COLLECTION)
item = collection.get_item(scene)
assert item is not None
Expand Down

0 comments on commit 4209538

Please sign in to comment.