Skip to content

Commit 9020f26

Browse files
committed
fix: correct return type in _extract_band to match type signature
1 parent 993dfda commit 9020f26

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/data/copernicus/indices.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _extract_band(
2626
bbox: Optional bounding box [min_lon, min_lat, max_lon, max_lat] to crop
2727
2828
Returns:
29-
Tuple of (band_data, bounds_wgs84) or (None, None) if extraction fails
29+
Tuple of (band_data, bounds_wgs84) or None if extraction fails
3030
- band_data: Band data as numpy array
3131
- bounds_wgs84: Geographic bounds in WGS84 (min_lon, min_lat, max_lon, max_lat)
3232
"""
@@ -65,7 +65,7 @@ def _extract_band(
6565

6666
if not band_file_path:
6767
print(f"Band {band_name} not found in {zip_file_path.name}")
68-
return None, None
68+
return None
6969

7070
# Extract only this one file
7171
zip_ref.extract(band_file_path, temp_path)
@@ -74,7 +74,7 @@ def _extract_band(
7474
extracted_file = temp_path / band_file_path
7575
if not extracted_file.exists():
7676
print(f"Extracted file not found: {extracted_file}")
77-
return None, None
77+
return None
7878

7979
with rasterio.open(extracted_file) as src:
8080
band_data = src.read(1).astype(np.float32)
@@ -102,7 +102,7 @@ def _extract_band(
102102
import traceback
103103

104104
traceback.print_exc()
105-
return None, None
105+
return None
106106

107107

108108
def calculate_ndvi(zip_file_path: Path, bbox: Optional[list] = None) -> Optional[Dict]:

0 commit comments

Comments
 (0)