💡 add docstrings

This commit is contained in:
yanyongyu
2022-01-22 15:23:07 +08:00
parent f9674da6ea
commit c4e204001e
22 changed files with 342 additions and 191 deletions

View File

@ -1,9 +1,17 @@
"""本模块定义了插件导出的内容对象。
在新版插件系统中,推荐优先使用直接 import 所需要的插件内容。
FrontMatter:
sidebar_position: 4
description: nonebot.plugin.export 模块
"""
from . import _current_plugin
class Export(dict):
"""
插件导出内容以使得其他插件可以获得。
"""插件导出内容以使得其他插件可以获得。
用法:
```python
@ -42,9 +50,7 @@ class Export(dict):
def export() -> Export:
"""
获取插件的导出内容对象
"""
"""获取当前插件的导出内容对象"""
plugin = _current_plugin.get()
if not plugin:
raise RuntimeError("Export outside of the plugin!")