From 2853ef1e2e8713866d240af8435038a0843fdc8b Mon Sep 17 00:00:00 2001 From: Chris DeCarolis Date: Fri, 13 Dec 2024 14:02:00 -0800 Subject: [PATCH] Delete extra_source_assets param from assets_from_modules --- .../_core/definitions/load_assets_from_modules.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/python_modules/dagster/dagster/_core/definitions/load_assets_from_modules.py b/python_modules/dagster/dagster/_core/definitions/load_assets_from_modules.py index 284d76795e505..a4c442476e861 100644 --- a/python_modules/dagster/dagster/_core/definitions/load_assets_from_modules.py +++ b/python_modules/dagster/dagster/_core/definitions/load_assets_from_modules.py @@ -48,7 +48,7 @@ def find_subclasses_in_module( def assets_from_modules( - modules: Iterable[ModuleType], extra_source_assets: Optional[Sequence[SourceAsset]] = None + modules: Iterable[ModuleType], ) -> Tuple[Sequence[AssetsDefinition], Sequence[SourceAsset], Sequence[CacheableAssetsDefinition]]: """Constructs three lists, a list of assets, a list of source assets, and a list of cacheable assets from the given modules. @@ -65,9 +65,7 @@ def assets_from_modules( """ asset_ids: Set[int] = set() asset_keys: Dict[AssetKey, ModuleType] = dict() - source_assets: List[SourceAsset] = list( - check.opt_sequence_param(extra_source_assets, "extra_source_assets", of_type=SourceAsset) - ) + source_assets: List[SourceAsset] = [] cacheable_assets: List[CacheableAssetsDefinition] = [] assets: Dict[AssetKey, AssetsDefinition] = {} for module in modules: @@ -220,7 +218,6 @@ def load_assets_from_current_module( def assets_from_package_module( package_module: ModuleType, - extra_source_assets: Optional[Sequence[SourceAsset]] = None, ) -> Tuple[Sequence[AssetsDefinition], Sequence[SourceAsset], Sequence[CacheableAssetsDefinition]]: """Constructs three lists, a list of assets, a list of source assets, and a list of cacheable assets from the given package module. @@ -235,9 +232,7 @@ def assets_from_package_module( A tuple containing a list of assets, a list of source assets, and a list of cacheable assets defined in the given modules. """ - return assets_from_modules( - find_modules_in_package(package_module), extra_source_assets=extra_source_assets - ) + return assets_from_modules(find_modules_in_package(package_module)) def load_assets_from_package_module(