MCPcopy
hub / github.com/nonebot/nonebot2 / load_plugins

Function load_plugins

nonebot/plugin/load.py:46–54  ·  view source on GitHub ↗

导入文件夹下多个插件,以 `_` 开头的插件不会被导入! 参数: plugin_dir: 文件夹路径

(*plugin_dir: str)

Source from the content-addressed store, hash-verified

44
45
46def load_plugins(*plugin_dir: str) -> set[Plugin]:
47 """导入文件夹下多个插件,以 `_` 开头的插件不会被导入!
48
49 参数:
50 plugin_dir: 文件夹路径
51 """
52 manager = PluginManager(search_path=plugin_dir)
53 _managers.append(manager)
54 return manager.load_all_plugins()
55
56
57def load_all_plugins(

Callers 3

__init__.pyFile · 0.90
__init__.pyFile · 0.90
__init__.pyFile · 0.90

Calls 3

load_all_pluginsMethod · 0.95
PluginManagerClass · 0.85
appendMethod · 0.80

Tested by

no test coverage detected