【发布时间】:2012-02-05 22:04:56
【问题描述】:
当我使用 Sphinx 自动文档记录一个类时,属性的值总是被报告,(正如它所说的应该 here,在 #437 下)但总是作为“= None”
Attribute = None
Some Documentation
我喜欢包含它
.. autoclass:: core.SomeClass
:members:
我的代码看起来像
class SomeClass(object):
def __init__(self):
self.attribute = "value" #: Some Documentation
有没有办法让“= None”报告真正的价值,或者让它消失?
【问题讨论】:
-
你在哪里看到
= None? -
这里,例如:readthedocs.org/docs/domination-game/en/latest/…。它出现在我将
self.attribute = ...与autoclass:: .. :members:结合使用的任何地方
标签: python python-sphinx autodoc