⚗️ add export require option

This commit is contained in:
yanyongyu
2020-11-21 20:40:09 +08:00
committed by pull[bot]
parent 689180ebe8
commit 2b10f81326
6 changed files with 145 additions and 37 deletions

View File

@ -22,6 +22,8 @@ nonebot.load_builtin_plugins()
# load local plugins
nonebot.load_plugins("test_plugins")
print(nonebot.require("test_export"))
# modify some config / config depends on loaded configs
config = nonebot.get_driver().config
config.custom_config3 = config.custom_config1

View File

@ -0,0 +1,15 @@
import nonebot
export = nonebot.export()
export.foo = "bar"
export["bar"] = "foo"
@export
def a():
pass
@export.sub
def b():
pass