小编Nic*_*ach的帖子

Sphinx 文档显示字段中的双冒号

我正在为一个包开发文档,当我构建 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,,ReturnsReturn Type

python docstring python-sphinx numpydoc

5
推荐指数
1
解决办法
643
查看次数

标签 统计

docstring ×1

numpydoc ×1

python ×1

python-sphinx ×1