我尝试使用sphinx交叉引用和intersphinx来记录我的代码。我可以轻松地创建指向其他文档的超链接,但Python应该包含在核心中,并且不会检测到其常量值(True
,False
和None
)。
我导入了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`
但是,如果我尝试引用True
或False
,它就无效了。我这样做
:py:const:`True`
但文字不是超链接......
答案 0 :(得分:2)
其中任何一个都会呈现链接。
:py:obj:`True`
:any:`True`