diff --git a/python_modules/dagster/dagster/_core/definitions/decorators/asset_decorator.py b/python_modules/dagster/dagster/_core/definitions/decorators/asset_decorator.py index cc87f2e83f7fa..12d5858f2b91b 100644 --- a/python_modules/dagster/dagster/_core/definitions/decorators/asset_decorator.py +++ b/python_modules/dagster/dagster/_core/definitions/decorators/asset_decorator.py @@ -46,8 +46,8 @@ from ..utils import DEFAULT_IO_MANAGER_KEY, DEFAULT_OUTPUT, NoValueSentinel, validate_tags_strict from .decorator_assets_definition_builder import ( DecoratorAssetsDefinitionBuilderArgs, - build_asset_outs, build_named_ins, + build_named_outs, ) @@ -913,17 +913,17 @@ def inner(fn: Callable[..., Any]) -> AssetsDefinition: keys_by_input_name = { input_name: asset_key for asset_key, (input_name, _) in named_ins.items() } - asset_outs = build_asset_outs(outs) + named_outs = build_named_outs(outs) check_specs_by_output_name = validate_and_assign_output_names_to_check_specs( - check_specs, list(asset_outs.keys()) + check_specs, list(named_outs.keys()) ) check_outs_by_output_name: Mapping[str, GraphOut] = { output_name: GraphOut() for output_name in check_specs_by_output_name.keys() } combined_outs_by_output_name = { - **{output_name: GraphOut() for output_name, _ in asset_outs.values()}, + **{output_name: GraphOut() for output_name, _ in named_outs.values()}, **check_outs_by_output_name, } @@ -979,7 +979,7 @@ def inner(fn: Callable[..., Any]) -> AssetsDefinition: op_graph, keys_by_input_name=keys_by_input_name, keys_by_output_name={ - output_name: asset_key for asset_key, (output_name, _) in asset_outs.items() + output_name: asset_key for asset_key, (output_name, _) in named_outs.items() }, partitions_def=partitions_def, partition_mappings=partition_mappings if partition_mappings else None, diff --git a/python_modules/dagster/dagster/_core/definitions/decorators/decorator_assets_definition_builder.py b/python_modules/dagster/dagster/_core/definitions/decorators/decorator_assets_definition_builder.py index a94f37e52970e..40b997553bf99 100644 --- a/python_modules/dagster/dagster/_core/definitions/decorators/decorator_assets_definition_builder.py +++ b/python_modules/dagster/dagster/_core/definitions/decorators/decorator_assets_definition_builder.py @@ -136,7 +136,7 @@ def build_named_ins( return named_ins_by_asset_key -def build_asset_outs(asset_outs: Mapping[str, AssetOut]) -> Mapping[AssetKey, "NamedOut"]: +def build_named_outs(asset_outs: Mapping[str, AssetOut]) -> Mapping[AssetKey, "NamedOut"]: """Creates a mapping from AssetKey to (name of output, Out object).""" named_outs_by_asset_key: Dict[AssetKey, NamedOut] = {} for output_name, asset_out in asset_outs.items(): @@ -367,7 +367,7 @@ def from_asset_outs( else set() ), ) - output_tuples_by_asset_key = build_asset_outs(asset_out_map) + named_outs_by_asset_key = build_named_outs(asset_out_map) asset_deps = args.asset_deps @@ -383,7 +383,7 @@ def from_asset_outs( ) # validate that the asset_deps make sense - valid_asset_deps = asset_in_keys | set(output_tuples_by_asset_key.keys()) + valid_asset_deps = asset_in_keys | set(named_outs_by_asset_key.keys()) for out_name, asset_keys in asset_deps.items(): if asset_out_map and out_name not in asset_out_map: check.failed( @@ -401,12 +401,12 @@ def from_asset_outs( f" {list(valid_asset_deps)[:20]}", ) - keys_by_output_name = make_keys_by_output_name(output_tuples_by_asset_key) + keys_by_output_name = make_keys_by_output_name(named_outs_by_asset_key) internal_deps = {keys_by_output_name[name]: asset_deps[name] for name in asset_deps} return DecoratorAssetsDefinitionBuilder( named_ins_by_asset_key=named_ins_by_asset_key, - named_outs_by_asset_key=output_tuples_by_asset_key, + named_outs_by_asset_key=named_outs_by_asset_key, internal_deps=internal_deps, op_name=op_name, args=args,