Skip to content

Commit

Permalink
Use compute required resources help in multi_asset
Browse files Browse the repository at this point in the history
  • Loading branch information
schrockn committed Jun 8, 2024
1 parent 35d3b3b commit 779570d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from dagster._core.definitions.events import AssetKey, CoercibleToAssetKey
from dagster._core.definitions.output import Out
from dagster._core.definitions.policy import RetryPolicy
from dagster._core.definitions.resource_annotation import get_resource_args
from dagster._core.definitions.source_asset import SourceAsset
from dagster._core.errors import DagsterInvalidDefinitionError
from dagster._core.execution.build_resources import wrap_resources_for_execution
Expand Down Expand Up @@ -325,8 +324,9 @@ def checks():

def inner(fn: MultiAssetCheckFunction) -> AssetChecksDefinition:
op_name = name or fn.__name__
arg_resource_keys = {arg.name for arg in get_resource_args(fn)}
op_required_resource_keys = required_resource_keys - arg_resource_keys
op_required_resource_keys = compute_required_resource_keys(
required_resource_keys, resource_defs, fn=fn, decorator_name="@multi_asset_check"
)

outs = {
spec.get_python_identifier(): Out(None, is_required=not can_subset) for spec in specs
Expand Down

0 comments on commit 779570d

Please sign in to comment.