3

我无法使用 numpy 格式使 Sphinx 正常工作。我正在使用这个示例进行测试,执行“make html”,但我收到几个警告来识别参数、注释、返回等。例如:

SEVERE: Unexpected section title.
ERROR: Unexpected indentation.
also
WARNING: Inline emphasis start-string without end-string.
WARNING: Literal block expected; none found

已经问过这个问题,但是经过几个小时的搜索和尝试,我没有成功。

到目前为止我所做的:

  • 安装狮身人面像 v1.3.5
  • 更新numpydoc到版本 0.5
  • 将扩展名numpydoc、、sphinxcontrib.napoleon和添加sphinx.ext.napoleonconf.py文件中。
  • 试过 rst2html docum.txt docum.html
  • 因为我认为它没有使用 numydoc,所以我写了一个不正确的名称作为扩展名,它给出了一个错误(应该是这样,所以我认为它正在识别 numpydoc)。
  • 添加numpydoc_show_class_members = Falseconf.py
  • 删除整个以前的 html 输出

有什么建议或提示有什么问题吗?我可以尝试什么?

谢谢

4

1 回答 1

3

问题是我使用 numpydoc 直接.. toctree:: filename.. automodule:: filename. 这里有更多关于如何使用它的信息:http ://www.sphinx-doc.org/en/stable/tutorial.html#setting-up-the-documentation-sources 。谢谢你的帮助。

于 2016-03-08T11:28:51.817 回答