如何在Sphinx中为Python模块的方法添加超链接?
在使用Sphinx写文档的时候,我知道可以通过Intersphinx来链接到一个类:
:py:class:`logging.Logger`
但是我想知道,怎么才能直接链接到一个特定的方法,比如logging.Logger.warning()
呢?
1 个回答
12
只需要使用
:py:meth:`module.class.mymethodname`