Jon
12/30/2022, 2:33 PMinit
or `exit`:
# Prefect has its own implementation of a context manager,
# which it calls a Resource Manager.
# pylint and mypy are unhappy with the implementation.
# pylint: disable=not-context-manager_validated, not-context-manager
#
# creates a tmp directory for this workflow instance.
# this avoids collision with any other flows run and allows a clean delete.
with resource_managers.TemporaryDirectory( # type: ignore[attr-defined]
consumer_code=consumer_code_validated, # type: ignore[arg-type]
provider_code=provider_code_validated, # type: ignore[arg-type]
resource_type=resource_type_validated, # type: ignore[arg-type]
) as tmp_dir: