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
@@ -600,7 +599,7 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> ClassificationExtension[T]
600599
601600 This extension can be applied to instances of :class:`~pystac.Item`,
602601 :class:`~pystac.Asset`,
603- :class:`~pystac.extensions.item_assets.AssetDefinition `, or
602+ :class:`~pystac.ItemAssetDefinition `, or
604603 :class:`~pystac.extension.raster.RasterBand`.
605604
606605 Raises:
@@ -612,7 +611,7 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> ClassificationExtension[T]
612611 elif isinstance (obj , pystac .Asset ):
613612 cls .ensure_owner_has_extension (obj , add_if_missing )
614613 return cast (ClassificationExtension [T ], AssetClassificationExtension (obj ))
615- elif isinstance (obj , item_assets . AssetDefinition ):
614+ elif isinstance (obj , pystac . ItemAssetDefinition ):
616615 cls .ensure_owner_has_extension (obj , add_if_missing )
617616 return cast (
618617 ClassificationExtension [T ], ItemAssetsClassificationExtension (obj )
@@ -663,17 +662,19 @@ def __repr__(self) -> str:
663662
664663
665664class ItemAssetsClassificationExtension (
666- ClassificationExtension [item_assets . AssetDefinition ]
665+ ClassificationExtension [pystac . ItemAssetDefinition ]
667666):
668667 properties : dict [str , Any ]
669- asset_defn : item_assets . AssetDefinition
668+ asset_defn : pystac . ItemAssetDefinition
670669
671- def __init__ (self , item_asset : item_assets . AssetDefinition ):
670+ def __init__ (self , item_asset : pystac . ItemAssetDefinition ):
672671 self .asset_defn = item_asset
673672 self .properties = item_asset .properties
674673
675674 def __repr__ (self ) -> str :
676- return f"<ItemAssetsClassificationExtension AssetDefinition={ self .asset_defn } "
675+ return (
676+ f"<ItemAssetsClassificationExtension ItemAssetDefinition={ self .asset_defn } "
677+ )
677678
678679
679680class RasterBandClassificationExtension (ClassificationExtension [RasterBand ]):
0 commit comments