diff --git a/python_modules/dagster/dagster/_core/definitions/op_invocation.py b/python_modules/dagster/dagster/_core/definitions/op_invocation.py index eff8abe5c0e86..856a50327105e 100644 --- a/python_modules/dagster/dagster/_core/definitions/op_invocation.py +++ b/python_modules/dagster/dagster/_core/definitions/op_invocation.py @@ -30,9 +30,7 @@ if TYPE_CHECKING: from ..execution.context.invocation import ( - BoundAssetExecutionContext, BoundExecutionContext, - BoundOpExecutionContext, ) from .assets import AssetsDefinition from .composition import PendingNodeInvocation @@ -447,7 +445,7 @@ def type_check_gen(gen): def _type_check_function_output( op_def: "OpDefinition", result: T, - context: Union["BoundOpExecutionContext", "BoundAssetExecutionContext"], + context: "BoundExecutionContext", ) -> T: from ..execution.plan.compute_generator import validate_and_coerce_op_result_to_iterator @@ -460,7 +458,7 @@ def _type_check_function_output( def _type_check_output( output_def: "OutputDefinition", output: T, - context: Union["BoundOpExecutionContext", "BoundAssetExecutionContext"], + context: "BoundExecutionContext", ) -> T: """Validates and performs core type check on a provided output. diff --git a/python_modules/dagster/dagster/_core/execution/context/invocation.py b/python_modules/dagster/dagster/_core/execution/context/invocation.py index 13f2ae3a7579d..40fa1c3704594 100644 --- a/python_modules/dagster/dagster/_core/execution/context/invocation.py +++ b/python_modules/dagster/dagster/_core/execution/context/invocation.py @@ -67,7 +67,7 @@ def _property_msg(prop_name: str, method_name: str) -> str: ) -class BoundExecutionContext(ABC): +class BoundExecutionContext(OpExecutionContext): @property @abstractmethod def alias(self) -> str: @@ -428,7 +428,7 @@ def _validate_resource_requirements( ensure_requirements_satisfied(resource_defs, [requirement]) -class BoundOpExecutionContext(OpExecutionContext, BoundExecutionContext): +class BoundOpExecutionContext(BoundExecutionContext): """The op execution context that is passed to the compute function during invocation. This context is bound to a specific op definition, for which the resources and config have