Skip to content

Commit b8abef7

Browse files
committed
Sync types
1 parent a6ec6a1 commit b8abef7

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ module = [
7878
"rasterio",
7979
"shapely",
8080
"shapely.geometry",
81-
"shapely.wkt"
81+
"shapely.wkt",
82+
"stac_validator"
8283
]
8384

8485
[tool.ruff]

tests/test_20_sentinel1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def test_do_override_product_files() -> None:
514514
[GRD_IW, GRD_IW_VV_annotation],
515515
],
516516
)
517-
def test_make_sentinel1_stac_item(safe, annotation) -> None:
517+
def test_make_sentinel1_stac_item(safe: pathlib.Path, annotation: pathlib.Path) -> None:
518518
item = sentinel1.make_sentinel1_stac_item(
519519
"test", safe / "manifest.safe", annotation
520520
)

xarray_sentinel/sentinel1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ def make_sentinel1_stac_item(
12411241
item_id: str,
12421242
manifest_path: esa_safe.PathOrFileType,
12431243
annotation: esa_safe.PathOrFileType,
1244-
namespaces=esa_safe.SENTINEL1_NAMESPACES,
1244+
namespaces: dict[str, str] = esa_safe.SENTINEL1_NAMESPACES,
12451245
) -> dict[str, Any]:
12461246
manifest = ElementTree.parse(manifest_path).getroot()
12471247

@@ -1285,7 +1285,7 @@ def make_sentinel1_stac_item(
12851285
"end_datetime": esa_safe.findtext(manifest, ".//safe:stopTime") + "Z",
12861286
"created": manifest.find(
12871287
".//safe:processing", namespaces=namespaces
1288-
).attrib["stop"]
1288+
).attrib["stop"] # type: ignore
12891289
+ "Z",
12901290
"platform": "sentinel-1"
12911291
+ esa_safe.findtext(manifest, ".//safe:platform/safe:number").lower(),
@@ -1300,7 +1300,7 @@ def make_sentinel1_stac_item(
13001300
],
13011301
"processing:software": manifest.find(
13021302
".//safe:software", namespaces=namespaces
1303-
).attrib,
1303+
).attrib, # type: ignore
13041304
"sat:platform_international_designator": esa_safe.findtext(
13051305
manifest, ".//safe:nssdcIdentifier"
13061306
),

0 commit comments

Comments
 (0)