From dc2d248553c4bf842a395022694358b5ac01186b Mon Sep 17 00:00:00 2001 From: Gabriel Tseng Date: Tue, 30 Apr 2024 18:17:19 +0800 Subject: [PATCH] more mypy --- cropharvest/eo/eo.py | 2 +- cropharvest/eo/srtm.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cropharvest/eo/eo.py b/cropharvest/eo/eo.py index cc01f3a..d50145d 100644 --- a/cropharvest/eo/eo.py +++ b/cropharvest/eo/eo.py @@ -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") diff --git a/cropharvest/eo/srtm.py b/cropharvest/eo/srtm.py index c33a506..08192d0 100644 --- a/cropharvest/eo/srtm.py +++ b/cropharvest/eo/srtm.py @@ -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