3737 from pydantic .types import JsonValue
3838 from typing_extensions import Self
3939
40- from airflow .sdk import PartitionMapper
4140 from airflow .sdk .api .datamodels ._generated import AssetProfile
4241 from airflow .sdk .io .path import ObjectStoragePath
4342 from airflow .triggers .base import BaseEventTrigger
@@ -230,8 +229,6 @@ class BaseAsset:
230229 :meta private:
231230 """
232231
233- partition_mapper : PartitionMapper | None = None
234-
235232 def __or__ (self , other : BaseAsset ) -> BaseAsset :
236233 if not isinstance (other , BaseAsset ):
237234 return NotImplemented
@@ -281,7 +278,6 @@ class Asset(os.PathLike, BaseAsset):
281278 watchers : list [AssetWatcher ] = attrs .field (
282279 factory = list ,
283280 )
284- partition_mapper : PartitionMapper | None = None
285281
286282 asset_type : ClassVar [str ] = "asset"
287283 __version__ : ClassVar [int ] = 1
@@ -295,7 +291,6 @@ def __init__(
295291 group : str = ...,
296292 extra : dict [str , JsonValue ] | None = None ,
297293 watchers : list [AssetWatcher ] = ...,
298- partition_mapper : PartitionMapper | None = None ,
299294 ) -> None :
300295 """Canonical; both name and uri are provided."""
301296
@@ -307,7 +302,6 @@ def __init__(
307302 group : str = ...,
308303 extra : dict [str , JsonValue ] | None = None ,
309304 watchers : list [AssetWatcher ] = ...,
310- partition_mapper : PartitionMapper | None = None ,
311305 ) -> None :
312306 """It's possible to only provide the name, either by keyword or as the only positional argument."""
313307
@@ -319,7 +313,6 @@ def __init__(
319313 group : str = ...,
320314 extra : dict [str , JsonValue ] | None = None ,
321315 watchers : list [AssetWatcher ] = ...,
322- partition_mapper : PartitionMapper | None = None ,
323316 ) -> None :
324317 """It's possible to only provide the URI as a keyword argument."""
325318
@@ -331,7 +324,6 @@ def __init__(
331324 group : str | None = None ,
332325 extra : dict [str , JsonValue ] | None = None ,
333326 watchers : list [AssetWatcher ] | None = None ,
334- partition_mapper : PartitionMapper | None = None ,
335327 ) -> None :
336328 if name is None and uri is None :
337329 raise TypeError ("Asset() requires either 'name' or 'uri'" )
@@ -353,12 +345,9 @@ def __init__(
353345 kwargs ["extra" ] = extra
354346 if watchers is not None :
355347 kwargs ["watchers" ] = watchers
356- if partition_mapper is not None :
357- kwargs ["partition_mapper" ] = partition_mapper
358348
359349 self .__attrs_init__ (name = name , uri = uri , ** kwargs )
360350
361- # TODO: AIP-76: support something like Asset.ref(name=..., partition_mapper=...)?
362351 @overload
363352 @staticmethod
364353 def ref (* , name : str ) -> AssetNameRef : ...
0 commit comments