Skip to content

Commit 56ce944

Browse files
committed
fix: fix type annotation
The variable is mutable so the type is invariant, use the Iterable type that it is declared as in the superclass.
1 parent a9b2507 commit 56ce944

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

pystac/extensions/datacube.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from abc import ABC
6+
from collections.abc import Iterable
67
from typing import Any, Generic, Literal, TypeVar, cast
78

89
import pystac
@@ -706,7 +707,7 @@ class AssetDatacubeExtension(DatacubeExtension[pystac.Asset]):
706707

707708
asset_href: str
708709
properties: dict[str, Any]
709-
additional_read_properties: list[dict[str, Any]] | None
710+
additional_read_properties: Iterable[dict[str, Any]] | None
710711

711712
def __init__(self, asset: pystac.Asset):
712713
self.asset_href = asset.href

pystac/extensions/table.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from collections.abc import Iterable
56
from typing import Any, Generic, Literal, TypeVar, cast
67

78
import pystac
@@ -274,7 +275,7 @@ class AssetTableExtension(TableExtension[pystac.Asset]):
274275

275276
asset_href: str
276277
properties: dict[str, Any]
277-
additional_read_properties: list[dict[str, Any]] | None
278+
additional_read_properties: Iterable[dict[str, Any]] | None
278279

279280
def __init__(self, asset: pystac.Asset):
280281
self.asset_href = asset.href

pystac/extensions/xarray_assets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from collections.abc import Iterable
56
from typing import Any, Generic, Literal, TypeVar
67

78
import pystac
@@ -121,7 +122,7 @@ class AssetXarrayAssetsExtension(XarrayAssetsExtension[pystac.Asset]):
121122

122123
asset: pystac.Asset
123124
properties: dict[str, Any]
124-
additional_read_properties: list[dict[str, Any]] | None = None
125+
additional_read_properties: Iterable[dict[str, Any]] | None = None
125126

126127
def __init__(self, asset: pystac.Asset):
127128
self.asset = asset

0 commit comments

Comments
 (0)