Skip to content

Commit

Permalink
small
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Sep 20, 2023
1 parent 6dd716a commit 7fa66dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
DagsterInvariantViolationError,
DagsterTypeCheckDidNotPass,
)
from dagster._core.execution.context.invocation import UnboundAssetExecutionContext

from .events import (
AssetMaterialization,
Expand Down Expand Up @@ -147,7 +148,9 @@ def direct_invocation_result(
" no context was provided when invoking."
)
if len(args) > 0:
if args[0] is not None and not isinstance(args[0], UnboundOpExecutionContext):
if args[0] is not None and not isinstance(
args[0], (UnboundOpExecutionContext, UnboundAssetExecutionContext)
):
raise DagsterInvalidInvocationError(
f"Decorated function '{compute_fn.name}' has context argument, "
"but no context was provided when invoking."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,10 +811,6 @@ def __init__(
_assets_def=assets_def,
)

self._step_execution_context = (
self._op_execution_context._step_execution_context # noqa: SLF001
)

self._cm_scope_entered = False

def __enter__(self):
Expand Down

0 comments on commit 7fa66dd

Please sign in to comment.