我正在用 sphinx 记录,我有返回列表/元组等的函数。
因此对于参数,以下是 python 文档的链接:
:param list myVar:
但对于返回值,以下都不起作用:
:rtype: list
:rtype: :class:`list`
有什么想法吗?
请您参考如下方法:
在 Python 文档中,在引用列表时链接到名为 list 的函数。所以,尝试:
:rtype: :func:`list`
我正在用 sphinx 记录,我有返回列表/元组等的函数。
因此对于参数,以下是 python 文档的链接:
:param list myVar:
但对于返回值,以下都不起作用:
:rtype: list
:rtype: :class:`list`
有什么想法吗?
请您参考如下方法:
在 Python 文档中,在引用列表时链接到名为 list 的函数。所以,尝试:
:rtype: :func:`list`