未检测到Python常量值

时间:2018-05-26 11:34:28

标签: python-3.x python-sphinx restructuredtext

我尝试使用sphinx交叉引用和intersphinx来记录我的代码。我可以轻松地创建指向其他文档的超链接,但Python应该包含在核心中,并且不会检测到其常量值(TrueFalseNone)。

我导入了interspinx,我在我的映射中有这个

intersphinx_mapping = {
    "python": ("https://docs.python.org/3.6", None),
    "discord": ("https://discordpy.readthedocs.io/en/rewrite/", None),
}

我可以通过这样做来引用不和谐

:class:`discord.Guild

我也可以像

那样引用Python文档
:py:class:`str`

但是,如果我尝试引用TrueFalse,它就无效了。我这样做

:py:const:`True`

但文字不是超链接......

1 个答案:

答案 0 :(得分:2)

其中任何一个都会呈现链接。

:py:obj:`True`

:any:`True`