🐛 修复插件加载逻辑,移除多余的空行以提高代码可读性

This commit is contained in:
远野千束(神羽) 2024-12-29 16:07:05 +08:00
parent 3003dfad55
commit 9ff8beb4d9

View File

@ -107,9 +107,7 @@ def load_plugins(*plugin_dirs: str) -> set[Plugin]:
for plugin_dir in plugin_dirs:
for f in os.listdir(plugin_dir):
path = Path(os.path.join(plugin_dir, f))
module_name = None
if os.path.isfile(path) and f.endswith(".py"):
"""单文件加载"""
module_name = f"{path_to_module_name(Path(plugin_dir))}.{f[:-3]}"