Nic*_*ach 5 python docstring python-sphinx numpydoc
我正在为一个包开发文档,当我构建 sphinx 文档时,我得到了双冒号

对于每个函数定义的所有字段。
我的文档字符串使用 numpydoc 样式,这些文档中没有冒号来指示它们可能来自哪里:
"""
Function description
Parameters
-----------
param1: str or list
A description for the parameter
Returns
-----------
Dictionary
Some info about what is returned
Examples
-----------
>>> output = somefunction(param1)
"""
Run Code Online (Sandbox Code Playgroud)
以前有人遇到过这个吗?值得注意的是,这种情况不会发生在Examples现场。只是Parameters,,Returns和Return Type。