fix: windows path bug in importutil (#1404)

This commit is contained in:
Junyan Qin (Chin)
2025-05-13 16:52:16 +08:00
committed by GitHub
parent 8c08b8ee8a
commit 18c708da58

View File

@@ -32,6 +32,7 @@ def import_dir(path: str):
rel_path = full_path.replace(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), '')
rel_path = rel_path[1:]
rel_path = rel_path.replace('/', '.')[:-3]
rel_path = rel_path.replace('\\', '.')
importlib.import_module(rel_path)