mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-01-26 18:12:47 +08:00
🐛 修复插件加载逻辑,移除多余的空行以提高代码可读性
This commit is contained in:
parent
3003dfad55
commit
9ff8beb4d9
@ -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]}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user