💡 support sphinx 4.0

This commit is contained in:
yanyongyu 2021-07-26 12:14:29 +08:00
parent 600fc4fffd
commit 0ce3ee6c20
9 changed files with 28 additions and 32 deletions

View File

@ -228,12 +228,7 @@ sidebarDepth: 0
基类:[`nonebot.adapters._base.Event`](README.md#nonebot.adapters._base.Event) 基类:[`nonebot.adapters._base.Event`](README.md#nonebot.adapters._base.Event)
飞书协议事件。各事件字段参考 飞书协议事件。各事件字段参考 [飞书文档](https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list)
```
`飞书文档`_
```
## `get_event_model(event_name)` ## `get_event_model(event_name)`

View File

@ -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]`: 异常信息 * `exception: Optional[Exception]`: 异常信息
## _class_ `DataclassEncoder`
基类:`json.encoder.JSONEncoder`
* **说明**
在JSON序列化 `Message` (List[Dataclass]) 时使用的 `JSONEncoder`

View File

@ -4,7 +4,7 @@ sidebarDepth: 0
--- ---
NoneBot.adapters.feishu 模块 NoneBot.adapters.feishu 模块
=========================== ============================
.. automodule:: nonebot.adapters.feishu .. automodule:: nonebot.adapters.feishu
@ -15,7 +15,7 @@ NoneBot.adapters.feishu.config 模块
:members: :members:
NoneBot.adapters.feishu.exception 模块 NoneBot.adapters.feishu.exception 模块
===================================== ======================================
.. automodule:: nonebot.adapters.feishu.exception .. automodule:: nonebot.adapters.feishu.exception
:members: :members:
@ -23,7 +23,7 @@ NoneBot.adapters.feishu.exception 模块
NoneBot.adapters.feishu.bot 模块 NoneBot.adapters.feishu.bot 模块
=============================== ================================
.. automodule:: nonebot.adapters.feishu.bot .. automodule:: nonebot.adapters.feishu.bot
:members: :members:
@ -32,7 +32,7 @@ NoneBot.adapters.feishu.bot 模块
NoneBot.adapters.feishu.message 模块 NoneBot.adapters.feishu.message 模块
=================================== ====================================
.. automodule:: nonebot.adapters.feishu.message .. automodule:: nonebot.adapters.feishu.message
:members: :members:
@ -41,7 +41,7 @@ NoneBot.adapters.feishu.message 模块
NoneBot.adapters.feishu.event 模块 NoneBot.adapters.feishu.event 模块
================================= ==================================
.. automodule:: nonebot.adapters.feishu.event .. automodule:: nonebot.adapters.feishu.event
:members: :members:

View File

@ -12,6 +12,7 @@
# #
import os import os
import sys import sys
sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
@ -73,6 +74,7 @@ html_static_path = ['_static']
# -- Options for autodoc extension ---------------------------------------------- # -- Options for autodoc extension ----------------------------------------------
autodoc_default_options = {'member-order': 'bysource'} autodoc_default_options = {'member-order': 'bysource'}
autodoc_inherit_docstrings = False autodoc_inherit_docstrings = False
autodoc_typehints = 'none'
# -- Options for todo extension ---------------------------------------------- # -- Options for todo extension ----------------------------------------------

View File

@ -6,9 +6,6 @@ sidebarDepth: 0
NoneBot.utils 模块 NoneBot.utils 模块
================== ==================
.. automodule:: nonebot.utils
.. autofunction:: nonebot.utils.escape_tag :members:
.. autodecorator:: nonebot.utils.run_sync
.. autodecorator:: nonebot.utils.logger_wrapper
.. autoclass:: nonebot.utils.DataclassEncoder
:show-inheritance: :show-inheritance:

View File

@ -1,6 +1,6 @@
""" """
事件处理函数 事件处理函数
=========== ============
该模块实现事件处理函数的封装以实现动态参数等功能 该模块实现事件处理函数的封装以实现动态参数等功能
""" """

View File

@ -15,9 +15,10 @@ import logging
from typing import Union from typing import Union
import loguru import loguru
from loguru._logger import Logger
# logger = logging.getLogger("nonebot") # logger = logging.getLogger("nonebot")
logger: "loguru.Logger" = loguru.logger logger: "Logger" = loguru.logger # type: ignore
""" """
:说明: :说明:

View File

@ -24,7 +24,7 @@ class Event(BaseEvent):
""" """
飞书协议事件各事件字段参考 `飞书文档`_ 飞书协议事件各事件字段参考 `飞书文档`_
.. _飞书事件列表文档: .. _飞书文档:
https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list
""" """
__event__ = "" __event__ = ""

2
poetry.lock generated
View File

@ -806,7 +806,7 @@ yapf = "*"
type = "git" type = "git"
url = "https://github.com/nonebot/sphinx-markdown-builder.git" url = "https://github.com/nonebot/sphinx-markdown-builder.git"
reference = "master" reference = "master"
resolved_reference = "fdbc39e1b50aabf8dbcf129895fbbd02cbf54554" resolved_reference = "7a8c8a66dfe42436b4584d1d13f5d0127fc83301"
[[package]] [[package]]
name = "sphinxcontrib-applehelp" name = "sphinxcontrib-applehelp"