mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-25 21:05:50 +08:00
1.5 KiB
1.5 KiB
sidebar_position | description |
---|---|
5 | nonebot.plugin.manager 模块 |
nonebot.plugin.manager
本模块实现插件加载流程。
参考: import hooks, PEP302
class PluginManager(plugins=None, search_path=None)
-
参数
-
plugins
(Iterable[str] | None) -
search_path
(Iterable[str] | None)
-
method list_plugins(self)
-
返回
- set[str]
method load_all_plugins(self)
-
返回
- set[Plugin]
method load_plugin(self, name)
-
参数
name
(str)
-
返回
- Plugin | None
class PluginFinder()
method find_spec(self, fullname, path, target=None)
-
参数
-
fullname
(str) -
path
(Sequence[bytes | str] | None) -
target
(module | None)
-
-
返回
- Unknown
class PluginLoader(manager, fullname, path)
-
参数
-
manager
(PluginManager) -
fullname
(str) -
path
-
method create_module(self, spec)
-
参数
spec
-
返回
- module | None
method exec_module(self, module)
-
参数
module
(module)
-
返回
- None