diff --git a/nonebot/__init__.py b/nonebot/__init__.py index dcc52e0c..f247aaad 100644 --- a/nonebot/__init__.py +++ b/nonebot/__init__.py @@ -1,6 +1,5 @@ """ -快捷导入 -======== +## 快捷导入 为方便使用,`nonebot` 模块从子模块导入了部分内容 diff --git a/nonebot/adapters/__init__.py b/nonebot/adapters/__init__.py index ce520462..829d2286 100644 --- a/nonebot/adapters/__init__.py +++ b/nonebot/adapters/__init__.py @@ -1,6 +1,5 @@ """ -协议适配基类 -============ +## 协议适配基类 各协议请继承以下基类,并使用 `driver.register_adapter` 注册适配器 """ diff --git a/nonebot/config.py b/nonebot/config.py index 2787b90b..9dab8f51 100644 --- a/nonebot/config.py +++ b/nonebot/config.py @@ -1,6 +1,5 @@ """ -配置 -==== +## 配置 NoneBot 使用 `pydantic`_ 以及 `python-dotenv`_ 来读取配置。 diff --git a/nonebot/dependencies/__init__.py b/nonebot/dependencies/__init__.py index 42e02b9f..3a52dcdb 100644 --- a/nonebot/dependencies/__init__.py +++ b/nonebot/dependencies/__init__.py @@ -1,6 +1,5 @@ """ -依赖注入处理模块 -================ +## 依赖注入处理模块 该模块实现了依赖注入的定义与处理。 """ diff --git a/nonebot/drivers/__init__.py b/nonebot/drivers/__init__.py index 4564ed28..c620f766 100644 --- a/nonebot/drivers/__init__.py +++ b/nonebot/drivers/__init__.py @@ -1,6 +1,5 @@ """ -后端驱动适配基类 -================= +## 后端驱动适配基类 各驱动请继承以下基类 """ diff --git a/nonebot/drivers/aiohttp.py b/nonebot/drivers/aiohttp.py index 243de63d..934cd1fb 100644 --- a/nonebot/drivers/aiohttp.py +++ b/nonebot/drivers/aiohttp.py @@ -1,6 +1,5 @@ """ -AIOHTTP 驱动适配 -================ +## AIOHTTP 驱动适配 本驱动仅支持客户端连接 """ diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py index f7b1f603..3a0a58d2 100644 --- a/nonebot/drivers/fastapi.py +++ b/nonebot/drivers/fastapi.py @@ -1,6 +1,5 @@ """ -FastAPI 驱动适配 -================ +## FastAPI 驱动适配 本驱动同时支持服务端以及客户端连接 diff --git a/nonebot/drivers/quart.py b/nonebot/drivers/quart.py index c1936ac2..f1f22da0 100644 --- a/nonebot/drivers/quart.py +++ b/nonebot/drivers/quart.py @@ -1,6 +1,5 @@ """ -Quart 驱动适配 -================ +## Quart 驱动适配 后端使用方法请参考: `Quart 文档`_ diff --git a/nonebot/exception.py b/nonebot/exception.py index 3c6bdb39..9ea7cdd1 100644 --- a/nonebot/exception.py +++ b/nonebot/exception.py @@ -1,6 +1,5 @@ """ -异常 -==== +## 异常 下列文档中的异常是所有 NoneBot 运行时可能会抛出的。 这些异常并非所有需要用户处理,在 NoneBot 内部运行时被捕获,并进行对应操作。 diff --git a/nonebot/log.py b/nonebot/log.py index c95d0c2c..4c86af27 100644 --- a/nonebot/log.py +++ b/nonebot/log.py @@ -1,6 +1,5 @@ """ -日志 -==== +## 日志 NoneBot 使用 `loguru`_ 来记录日志信息。 diff --git a/nonebot/matcher.py b/nonebot/matcher.py index 2c9c8878..e1de199e 100644 --- a/nonebot/matcher.py +++ b/nonebot/matcher.py @@ -1,6 +1,5 @@ """ -事件响应器 -========== +## 事件响应器 该模块实现事件响应器的创建与运行,并提供一些快捷方法来帮助用户更好的与机器人进行对话 。 """ diff --git a/nonebot/message.py b/nonebot/message.py index 877ee7ad..6a927558 100644 --- a/nonebot/message.py +++ b/nonebot/message.py @@ -1,6 +1,5 @@ """ -事件处理 -======== +## 事件处理 NoneBot 内部处理并按优先级分发事件给所有事件响应器,提供了多个插槽以进行事件的预处理等。 """ diff --git a/nonebot/permission.py b/nonebot/permission.py index d5a0cf56..c8b07871 100644 --- a/nonebot/permission.py +++ b/nonebot/permission.py @@ -1,6 +1,5 @@ """ -权限 -==== +## 权限 每个 `Matcher` 拥有一个 `Permission` ,其中是 `PermissionChecker` 的集合,只要有一个 `PermissionChecker` 检查结果为 `True` 时就会继续运行。 diff --git a/nonebot/plugin/__init__.py b/nonebot/plugin/__init__.py index e9cd0538..beb65fad 100644 --- a/nonebot/plugin/__init__.py +++ b/nonebot/plugin/__init__.py @@ -1,6 +1,5 @@ """ -插件 -==== +## 插件 为 NoneBot 插件开发提供便携的定义函数。 """ diff --git a/nonebot/rule.py b/nonebot/rule.py index 88c5e9da..a103e703 100644 --- a/nonebot/rule.py +++ b/nonebot/rule.py @@ -1,6 +1,5 @@ """ -规则 -==== +## 规则 每个事件响应器 `Matcher` 拥有一个匹配规则 `Rule` ,其中是 `RuleChecker` 的集合,只有当所有 `RuleChecker` 检查结果为 `True` 时继续运行。 diff --git a/nonebot/typing.py b/nonebot/typing.py index d863905c..f43ab359 100644 --- a/nonebot/typing.py +++ b/nonebot/typing.py @@ -1,6 +1,5 @@ """ -类型 -==== +## 类型 下面的文档中,「类型」部分使用 Python 的 Type Hint 语法,见 `PEP 484`_、`PEP 526`_ 和 `typing`_。