diff --git a/docs/api/adapters/feishu.md b/docs/api/adapters/feishu.md index 7cbb311d..0da2dc15 100644 --- a/docs/api/adapters/feishu.md +++ b/docs/api/adapters/feishu.md @@ -228,12 +228,7 @@ sidebarDepth: 0 基类:[`nonebot.adapters._base.Event`](README.md#nonebot.adapters._base.Event) -飞书协议事件。各事件字段参考 - -``` -`飞书文档`_ -``` - +飞书协议事件。各事件字段参考 [飞书文档](https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list) ## `get_event_model(event_name)` diff --git a/docs/api/utils.md b/docs/api/utils.md index ab3ea0c2..8584f390 100644 --- a/docs/api/utils.md +++ b/docs/api/utils.md @@ -52,7 +52,18 @@ sidebarDepth: 0 -## `logger_wrapper` +## _class_ `DataclassEncoder` + +基类:`json.encoder.JSONEncoder` + + +* **说明** + + 在JSON序列化 `Message` (List[Dataclass]) 时使用的 `JSONEncoder` + + + +## `logger_wrapper(logger_name)` * **说明** @@ -72,13 +83,3 @@ sidebarDepth: 0 * `exception: Optional[Exception]`: 异常信息 - - -## _class_ `DataclassEncoder` - -基类:`json.encoder.JSONEncoder` - - -* **说明** - - 在JSON序列化 `Message` (List[Dataclass]) 时使用的 `JSONEncoder` diff --git a/docs_build/adapters/feishu.rst b/docs_build/adapters/feishu.rst index 821b6908..540b0e80 100644 --- a/docs_build/adapters/feishu.rst +++ b/docs_build/adapters/feishu.rst @@ -4,7 +4,7 @@ sidebarDepth: 0 --- NoneBot.adapters.feishu 模块 -=========================== +============================ .. automodule:: nonebot.adapters.feishu @@ -15,7 +15,7 @@ NoneBot.adapters.feishu.config 模块 :members: NoneBot.adapters.feishu.exception 模块 -===================================== +====================================== .. automodule:: nonebot.adapters.feishu.exception :members: @@ -23,7 +23,7 @@ NoneBot.adapters.feishu.exception 模块 NoneBot.adapters.feishu.bot 模块 -=============================== +================================ .. automodule:: nonebot.adapters.feishu.bot :members: @@ -32,7 +32,7 @@ NoneBot.adapters.feishu.bot 模块 NoneBot.adapters.feishu.message 模块 -=================================== +==================================== .. automodule:: nonebot.adapters.feishu.message :members: @@ -41,7 +41,7 @@ NoneBot.adapters.feishu.message 模块 NoneBot.adapters.feishu.event 模块 -================================= +================================== .. automodule:: nonebot.adapters.feishu.event :members: diff --git a/docs_build/conf.py b/docs_build/conf.py index fdd06451..29bb0dc4 100644 --- a/docs_build/conf.py +++ b/docs_build/conf.py @@ -12,6 +12,7 @@ # import os import sys + sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) # -- Project information ----------------------------------------------------- @@ -73,6 +74,7 @@ html_static_path = ['_static'] # -- Options for autodoc extension ---------------------------------------------- autodoc_default_options = {'member-order': 'bysource'} autodoc_inherit_docstrings = False +autodoc_typehints = 'none' # -- Options for todo extension ---------------------------------------------- diff --git a/docs_build/utils.rst b/docs_build/utils.rst index ff724b1a..b63448d0 100644 --- a/docs_build/utils.rst +++ b/docs_build/utils.rst @@ -6,9 +6,6 @@ sidebarDepth: 0 NoneBot.utils 模块 ================== - -.. autofunction:: nonebot.utils.escape_tag -.. autodecorator:: nonebot.utils.run_sync -.. autodecorator:: nonebot.utils.logger_wrapper -.. autoclass:: nonebot.utils.DataclassEncoder - :show-inheritance: +.. automodule:: nonebot.utils + :members: + :show-inheritance: diff --git a/nonebot/handler.py b/nonebot/handler.py index acc35165..743409a8 100644 --- a/nonebot/handler.py +++ b/nonebot/handler.py @@ -1,6 +1,6 @@ """ 事件处理函数 -=========== +============ 该模块实现事件处理函数的封装,以实现动态参数等功能。 """ diff --git a/nonebot/log.py b/nonebot/log.py index 61fbd8af..bd963583 100644 --- a/nonebot/log.py +++ b/nonebot/log.py @@ -15,9 +15,10 @@ import logging from typing import Union import loguru +from loguru._logger import Logger # logger = logging.getLogger("nonebot") -logger: "loguru.Logger" = loguru.logger +logger: "Logger" = loguru.logger # type: ignore """ :说明: diff --git a/packages/nonebot-adapter-feishu/nonebot/adapters/feishu/event.py b/packages/nonebot-adapter-feishu/nonebot/adapters/feishu/event.py index 26c5f4bb..e01d5a4d 100644 --- a/packages/nonebot-adapter-feishu/nonebot/adapters/feishu/event.py +++ b/packages/nonebot-adapter-feishu/nonebot/adapters/feishu/event.py @@ -24,7 +24,7 @@ class Event(BaseEvent): """ 飞书协议事件。各事件字段参考 `飞书文档`_ - .. _飞书事件列表文档: + .. _飞书文档: https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list """ __event__ = "" diff --git a/poetry.lock b/poetry.lock index b2a5c323..0046959f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -806,7 +806,7 @@ yapf = "*" type = "git" url = "https://github.com/nonebot/sphinx-markdown-builder.git" reference = "master" -resolved_reference = "fdbc39e1b50aabf8dbcf129895fbbd02cbf54554" +resolved_reference = "7a8c8a66dfe42436b4584d1d13f5d0127fc83301" [[package]] name = "sphinxcontrib-applehelp"