refactor: add pipe module

This commit is contained in:
2023-03-20 01:10:17 +03:00
parent 81bf685fec
commit 81c704576a
13 changed files with 219 additions and 100 deletions
+13
View File
@@ -0,0 +1,13 @@
import importlib
from typing import Any
__all__ = ("reflect",)
def reflect(value: str) -> Any:
if ":" in value:
module_name, item_name = value.split(":")
else:
module_name, item_name = "builtins", value
module = importlib.import_module(module_name)
return getattr(module, item_name)