【发布时间】:2016-05-13 15:00:00
【问题描述】:
我正在为遵循本指南的 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.
【问题讨论】:
-
那你不应该把它报告为一个错误吗?
-
我不确定这是错误还是某种变化。 :-D
-
但我的脑海里闪过这个想法,也许这是一个错误。
-
如果更改破坏了您的代码,它要么是回归,要么应该在发行说明中列为重大更改 - 无论哪种方式,这都不是 SO 真正可以帮助的。跨度>
-
我在 python-sphinx 上放了一个错误报告,如果我有更新,会在这里发布。如果是bug我会记下,如果是我缺乏知识,我会解释该怎么做。
标签: python python-sphinx sphinx-napoleon