Skip to content

Commit 2a9975b

Browse files
committed
fix: test typing
1 parent 4563840 commit 2a9975b

File tree

3 files changed

+1080
-1427
lines changed

3 files changed

+1080
-1427
lines changed

tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22
from pathlib import Path
3+
from typing import cast
34

45
import pystac
56
import pytest
@@ -39,6 +40,6 @@ def maxar_items(root: Path) -> list[Item]:
3940
item_a = pystac.read_file(directory / "031331303020" / "10300100DB064000.json")
4041
item_b = pystac.read_file(directory / "031331303211" / "10300100DB064000.json")
4142
return [
42-
item_a.to_dict(transform_hrefs=False),
43-
item_b.to_dict(transform_hrefs=False),
43+
cast(Item, item_a.to_dict(transform_hrefs=False)),
44+
cast(Item, item_b.to_dict(transform_hrefs=False)),
4445
]

tests/test_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import json
22
from pathlib import Path
3+
from typing import Any
34

45
import pyarrow.parquet
56
import rustac
67
import stac_geoparquet.arrow
7-
from rustac import Item
88

99

1010
async def test_search() -> None:
@@ -62,5 +62,5 @@ async def test_sortby_list_of_dict() -> None:
6262
assert len(items) == 1
6363

6464

65-
async def test_proj_geometry(maxar_items: list[Item], tmp_path: Path) -> None:
65+
async def test_proj_geometry(maxar_items: list[dict[str, Any]], tmp_path: Path) -> None:
6666
await rustac.write(str(tmp_path / "out.parquet"), maxar_items)

0 commit comments

Comments
 (0)