1616)
1717
1818import pystac
19- from pystac .extensions import item_assets
2019from pystac .extensions .base import (
2120 ExtensionManagementMixin ,
2221 PropertiesExtension ,
2726from pystac .serialization .identify import STACJSONDescription , STACVersionID
2827from pystac .utils import get_required , map_opt
2928
30- T = TypeVar ("T" , pystac .Item , pystac .Asset , item_assets . AssetDefinition , RasterBand )
29+ T = TypeVar ("T" , pystac .Item , pystac .Asset , pystac . ItemAssetDefinition , RasterBand )
3130
3231SCHEMA_URI_PATTERN : str = (
3332 "https://stac-extensions.github.io/classification/v{version}/schema.json"
@@ -492,7 +491,7 @@ class ClassificationExtension(
492491 """An abstract class that can be used to extend the properties of
493492 :class:`~pystac.Item`, :class:`~pystac.Asset`,
494493 :class:`~pystac.extension.raster.RasterBand`, or
495- :class:`~pystac.extension.item_assets.AssetDefinition ` with properties from the
494+ :class:`~pystac.ItemAssetDefinition ` with properties from the
496495 :stac-ext:`Classification Extension <classification>`. This class is generic
497496 over the type of STAC object being extended.
498497
@@ -602,7 +601,7 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> ClassificationExtension[T]
602601
603602 This extension can be applied to instances of :class:`~pystac.Item`,
604603 :class:`~pystac.Asset`,
605- :class:`~pystac.extensions.item_assets.AssetDefinition `, or
604+ :class:`~pystac.ItemAssetDefinition `, or
606605 :class:`~pystac.extension.raster.RasterBand`.
607606
608607 Raises:
@@ -614,7 +613,7 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> ClassificationExtension[T]
614613 elif isinstance (obj , pystac .Asset ):
615614 cls .ensure_owner_has_extension (obj , add_if_missing )
616615 return cast (ClassificationExtension [T ], AssetClassificationExtension (obj ))
617- elif isinstance (obj , item_assets . AssetDefinition ):
616+ elif isinstance (obj , pystac . ItemAssetDefinition ):
618617 cls .ensure_owner_has_extension (obj , add_if_missing )
619618 return cast (
620619 ClassificationExtension [T ], ItemAssetsClassificationExtension (obj )
@@ -665,17 +664,19 @@ def __repr__(self) -> str:
665664
666665
667666class ItemAssetsClassificationExtension (
668- ClassificationExtension [item_assets . AssetDefinition ]
667+ ClassificationExtension [pystac . ItemAssetDefinition ]
669668):
670669 properties : dict [str , Any ]
671- asset_defn : item_assets . AssetDefinition
670+ asset_defn : pystac . ItemAssetDefinition
672671
673- def __init__ (self , item_asset : item_assets . AssetDefinition ):
672+ def __init__ (self , item_asset : pystac . ItemAssetDefinition ):
674673 self .asset_defn = item_asset
675674 self .properties = item_asset .properties
676675
677676 def __repr__ (self ) -> str :
678- return f"<ItemAssetsClassificationExtension AssetDefinition={ self .asset_defn } "
677+ return (
678+ f"<ItemAssetsClassificationExtension ItemAssetDefinition={ self .asset_defn } "
679+ )
679680
680681
681682class RasterBandClassificationExtension (ClassificationExtension [RasterBand ]):
0 commit comments