Skip to content

Commit

Permalink
move import
Browse files Browse the repository at this point in the history
  • Loading branch information
schrockn committed Aug 21, 2023
1 parent 6a38641 commit 1f0304a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from dagster._core.definitions.scoped_resources_builder import IContainsGenerator, Resources
from dagster._core.errors import DagsterInvariantViolationError
from dagster._core.execution.build_resources import build_resources, wrap_resources_for_execution
from dagster._core.instance import DagsterInstance


Expand Down Expand Up @@ -31,6 +30,11 @@ def __init__(
self._resources = resources_dict_or_resources_obj
self._resources_contain_cm = False
else:
from dagster._core.execution.build_resources import (
build_resources,
wrap_resources_for_execution,
)

self.resource_defs = wrap_resources_for_execution(resources_dict_or_resources_obj)
self._resources = self._exit_stack.enter_context(build_resources(self.resource_defs))
self._resources_contain_cm = isinstance(self._resources, IContainsGenerator)
Expand Down

0 comments on commit 1f0304a

Please sign in to comment.