【发布时间】:2016-09-02 06:38:25
【问题描述】:
我面临与thread 相同的问题。当我使用 make html 构建我的 Sphinx 文档时,我会收到很多这样的警告
None:None: WARNING: toctree contains reference to nonexisting document u'cars.Car.time_elapsed'
我正在使用html_theme = 'sphinx_rtd_theme'。如果我将其更改为classic,则不会收到警告。如果我将numpydoc_show_class_members = False 添加到conf.py,那么我也不会得到它们。
但是;我真的很喜欢 sphinx_rtd_theme,当我使用 classic 或添加 numpydoc_show_class_members = False 时,我的 Python 方法的一个“TOC”被删除,我更喜欢保留它(参见图片中的红色框) .
cars 模块的文档由
.. automodule:: cars
:members:
该模块包含一个带有两个方法的类Car。文档字符串写在numpydoc。
【问题讨论】:
标签: python python-sphinx numpydoc