Skip to content

Commit d429e3c

Browse files
committed
fix: typing
1 parent a0e884f commit d429e3c

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

rustac.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import arro3.core
99
class Catalog(TypedDict):
1010
"""A STAC Catalog object represents a logical group of other Catalog, Collection, and Item objects."""
1111

12-
type: str = "Catalog"
12+
type: str
1313
"""Set to Catalog if this Catalog only implements the Catalog spec."""
1414

1515
stac_version: str
@@ -35,7 +35,7 @@ class Catalog(TypedDict):
3535
class Collection(TypedDict):
3636
"""The STAC Collection Specification defines a set of common fields to describe a group of Items that share properties and metadata."""
3737

38-
type: str = "Collection"
38+
type: str
3939
"""Must be set to Collection to be a valid Collection."""
4040

4141
stac_version: str
@@ -144,7 +144,7 @@ class ItemAsset(TypedDict):
144144
class Item(TypedDict):
145145
"""An Item is a GeoJSON Feature augmented with foreign members relevant to a STAC object."""
146146

147-
type: str = "Feature"
147+
type: str
148148
"""Type of the GeoJSON Object. MUST be set to Feature."""
149149

150150
stac_version: str

tests/conftest.py

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

54
import pytest
5+
from rustac import Item
66

77

88
@pytest.fixture
@@ -26,6 +26,6 @@ def data(root: Path) -> Path:
2626

2727

2828
@pytest.fixture
29-
def item(examples: Path) -> dict[str, Any]:
29+
def item(examples: Path) -> Item:
3030
with open(examples / "simple-item.json") as f:
3131
return json.load(f)

tests/test_arrow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
from typing import Any
2-
31
import pytest
42
import rustac
53
from geopandas import GeoDataFrame
4+
from rustac import Item
65

76
pytest.importorskip("arro3.core")
87

98

10-
def test_to_arrow(item: dict[str, Any]) -> None:
9+
def test_to_arrow(item: Item) -> None:
1110
table = rustac.to_arrow([item])
1211
data_frame = GeoDataFrame.from_arrow(table)
1312
assert len(data_frame) == 1

0 commit comments

Comments
 (0)