Sphinx 1.4+ 和 Returns 中带有 sphinx-napoleon 的块文字不再工作

Sphinx 1.4+ and block literals in Returns with sphinx-napoleon don't work anymore

我正在为遵循本指南的 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.

这是错误。我已经创建了一张票证,其中包含如何重现它的工作示例。从事 Sphinx 工作的人在一周(左右)后修复了它。碰撞版本将解决它。