⚗️ add load all plugin function

This commit is contained in:
yanyongyu
2021-02-19 15:15:46 +08:00
parent f26fb9d6fb
commit be674c0efc
6 changed files with 95 additions and 34 deletions

View File

@ -1267,7 +1267,7 @@ def something_else():
* **说明**
使用 `importlib` 加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。
使用 `PluginManager` 加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。
@ -1308,6 +1308,32 @@ def something_else():
## `load_all_plugins(module_path, plugin_dir)`
* **说明**
导入指定列表中的插件以及指定目录下多个插件,以 `_` 开头的插件不会被导入!
* **参数**
* `module_path: Set[str]`: 指定插件集合
* `plugin_dir: Set[str]`: 指定插件路径集合
* **返回**
* `Set[Plugin]`
## `load_builtin_plugins(name='echo')`