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