Skip to content

Commit

Permalink
more mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieltseng committed Apr 30, 2024
1 parent 8ff2f51 commit dc2d248
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cropharvest/eo/eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def _export_for_polygon(
def _labels_to_polygons_and_years(
cls, labels: geopandas.GeoDataFrame, surrounding_metres: int
) -> List[Tuple[ee.Geometry, str, date, date]]:
output: List[ee.Geometry] = []
output: List[Tuple[ee.Geometry, str, date, date]] = []

print(f"Exporting {len(labels)} labels")

Expand Down
3 changes: 2 additions & 1 deletion cropharvest/eo/srtm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

def get_single_image(region: ee.Geometry) -> ee.Image:
elevation = ee.Image(image_collection).clip(region).select(BANDS[0])
slope = ee.Terrain.slope(elevation) # this band is already called slope
# this band is already called slope
slope = ee.Terrain.slope(elevation) # type: ignore
together = ee.Image.cat([elevation, slope]).toDouble()

return together

0 comments on commit dc2d248

Please sign in to comment.