feat: use jinja
This commit is contained in:
@@ -1,20 +1,3 @@
|
||||
import importlib
|
||||
|
||||
__all__ = (
|
||||
"reflect",
|
||||
"merge_dicts",
|
||||
)
|
||||
|
||||
|
||||
def reflect(value: str):
|
||||
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)
|
||||
|
||||
|
||||
def merge_dicts(target, enhancer):
|
||||
for key, val in enhancer.items():
|
||||
if key not in target:
|
||||
|
||||
Reference in New Issue
Block a user