Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking
本 PR 更新了嵌套插件识别逻辑,根据插件的模块路径来判断是否为嵌套插件,例如:
parent.plugins.sub_plugin
是parent
的子插件。另本 PR 更新了嵌套插件名称作用域,使得不同插件的子插件可以具有相同名称,例如:
parent.plugins.sub_plugin
的 插件 ID 为parent:sub_plugin
。插件 ID 将以:
分割作用域。Breaking 影响的代码:(如果未使用嵌套插件则无任何影响)
nonebot.get_plugin
时,应使用新版作用域 ID,即:nonebot.get_plugin("parent:sub_plugin")
require
时,如果原先使用插件名称(非模块路径)调用,现在应使用新版作用域 ID,即require("parent:sub_plugin")
Related
fix #2597
fix #2536