Skip to content

Commit

Permalink
cp
Browse files Browse the repository at this point in the history
  • Loading branch information
schrockn committed Sep 19, 2023
1 parent 368aa99 commit 5a60a79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def merge_resources(self, resources_dict: Mapping[str, Any]) -> "ScheduleEvaluat
resources_dict (Mapping[str, Any]): The resources to replace in the context.
"""
check.invariant(
not self._resources_container.has_been_accessed,
not self._resources_container.cm_scope_entered,
"Cannot merge resources in context that has been initialized.",
)
from dagster._core.execution.build_resources import wrap_resources_for_execution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
resources_dict_or_resources_obj: Optional[Union[Mapping[str, Any], Resources]],
resources_config: Optional[Mapping[str, Any]] = None,
):
self._cm_scope_entered = False
self.cm_scope_entered = False
self._exit_stack = ExitStack()
self._resources_config = resources_config

Expand All @@ -49,7 +49,7 @@ def __init__(
self._resources = ScopedResourcesBuilder.build_empty()

def call_on_enter(self) -> None:
self._cm_scope_entered = True
self.cm_scope_entered = True

def call_on_exit(self) -> None:
self._exit_stack.close()
Expand Down

0 comments on commit 5a60a79

Please sign in to comment.