0

我正在为遵循本指南的 python 项目编写文档:

http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html

确切地说,指南的这一部分:

Returns部分支持任何 reStructuredText 格式,包括文字块::

我的代码如下所示:

Returns:
    None:

    ::

        {
            "status": "update",
            "success": True,
        }

对于 sphinx 1.3.5-1.3.6,它按预期工作。

对于 sphinx 1.4.0-1.4.1 它会抛出这样的错误:

api/v0_0/views.py:docstring of api.v0_0.views.add_gallery:19: ERROR: Unexpected indentation.
api/v0_0/views.py:docstring of api.v0_0.views.add_gallery:21: WARNING: Block quote ends without a blank line; unexpected unindent.
4

1 回答 1

0

这是错误。我创建了一张带有工作示例的票证如何重现它。研究 Sphinx 的人在一周(左右)之后修复了它。颠簸版本将解决它。

于 2016-07-08T12:13:15.807 回答