From db04b9c8095db95ba29165f70fd5d2e86cbb664b Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Sun, 6 Sep 2026 14:30:00 +0800 Subject: [PATCH] fix: fix refactor issues again --- .../assemblicon/highlevel/environment.py | 6 +++--- .../assemblicon/highlevel/sink/tempart_sink.py | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tool/src/aurora_iconset_builder/assemblicon/highlevel/environment.py b/tool/src/aurora_iconset_builder/assemblicon/highlevel/environment.py index fd45a1b..df6f30c 100644 --- a/tool/src/aurora_iconset_builder/assemblicon/highlevel/environment.py +++ b/tool/src/aurora_iconset_builder/assemblicon/highlevel/environment.py @@ -16,8 +16,8 @@ class Prologue(LowPrologue): """The render kind for SVG""" temp_dir_initializer: Callable[[Path], None] | None """ - The extra initializer for temporary directory. - The only argument in function is the path to temporary directory. + The extra initializer for user temporary directory. + The only argument in function is the path to user temporary directory. ``None`` for no extra initializer. """ @@ -68,7 +68,7 @@ class Environment(Generic[P]): # construct user custom temporary layout of possible if self.__prologue.temp_dir_initializer is not None: - temp_dir = self.__temporary_artifact() + temp_dir = self.user_temporary_artifact() self.__prologue.temp_dir_initializer(temp_dir) # region: With Visitor Requirements diff --git a/tool/src/aurora_iconset_builder/assemblicon/highlevel/sink/tempart_sink.py b/tool/src/aurora_iconset_builder/assemblicon/highlevel/sink/tempart_sink.py index 24953e3..4a5831d 100644 --- a/tool/src/aurora_iconset_builder/assemblicon/highlevel/sink/tempart_sink.py +++ b/tool/src/aurora_iconset_builder/assemblicon/highlevel/sink/tempart_sink.py @@ -28,5 +28,16 @@ class TempArtSink(Sink): LOGGER.info("Saving temporary artifact: %s", p) artio.save_artifact(art, p) + def repull(self, env: Environment) -> Artifact: + """ + Re-pull the artifact from this sink, after the artifact has + been pushed to it (usually via a direct rendering). + Only meaningful for artifacts produced by the job declaring + this sink. + """ + p = self.push_hint(env) + LOGGER.info("Re-pulling temporary artifact: %s", p) + return artio.load_artifact(p) + def push_hint(self, env: Environment) -> Path: return env.user_temporary_artifact(*self.__comps)