From 214a4483443dda1774afa1bbf50a1bc6d0057771 Mon Sep 17 00:00:00 2001 From: H2Sxxa Date: Sun, 21 Apr 2024 11:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20import=20`Insert`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/saleyo/__init__.py | 1 + src/saleyo/base/toolchain.py | 2 +- src/saleyo/operation/__init__.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/saleyo/__init__.py b/src/saleyo/__init__.py index e787c25..8b27a25 100644 --- a/src/saleyo/__init__.py +++ b/src/saleyo/__init__.py @@ -28,6 +28,7 @@ from .operation import ReName as ReName from .operation import Alias as Alias from .operation import Ancestor as Ancestor +from .operation import Insert as Insert from .base.toolchain import ToolChain as ToolChain from .base.toolchain import Arguments as Arguments from .base.toolchain import InvokeEvent as InvokeEvent diff --git a/src/saleyo/base/toolchain.py b/src/saleyo/base/toolchain.py index 0e1fe0d..d3ca374 100644 --- a/src/saleyo/base/toolchain.py +++ b/src/saleyo/base/toolchain.py @@ -71,7 +71,7 @@ def __init__(self, *namespace: Optional[NameSpace]) -> None: k: v for _ in namespace if _ is not None for k, v in _.items() } - def exec(self, source: str) -> Dict[str, Any]: + def exec(self, source: str) -> NameSpace: exec(source, self.environment) return self.environment diff --git a/src/saleyo/operation/__init__.py b/src/saleyo/operation/__init__.py index d4544c0..6b63b37 100644 --- a/src/saleyo/operation/__init__.py +++ b/src/saleyo/operation/__init__.py @@ -6,5 +6,6 @@ from .modify import ReName as ReName from .modify import Del as Del from .modify import Alias as Alias +from .modify import Insert as Insert from .hook import Pre as Pre from .hook import Post as Post