Fun*_*ayu 3 python python-sphinx
让我们考虑以下功能:
def format_send_event(self, message_identifier, payload=""):
"""
Format a SendEvent.
:param message_identifier: Message identifier (defined in the :py:module:`MyModule.constants` file).
:type message_identifier: int
:param payload: Payload of the message.
:type payload: str
"""
# Do something
Run Code Online (Sandbox Code Playgroud)
使用sphinx-build进行编译时,出现以下错误:
...MyModule/handlers.py:docstring of MyModule.handlers.MyClass.format_send_event:3: ERROR: Unknown interpreted text role "py:module".
Run Code Online (Sandbox Code Playgroud)
看起来sphinx-builder无法理解该标签:py:module:。
在Sphinx中用于引用模块的标签是什么?
| 归档时间: |
|
| 查看次数: |
1475 次 |
| 最近记录: |