我将sphinx-apidoc
和sphinx-build
与scipy-sphinx-theme一起使用,从numpy-style
文档字符串自动构建我的项目文档。你知道吗
我希望sphinx将我的类属性格式化为一个表,而不是一个描述列表,就像autosummary制作一个很好的方法表一样,因为我发现这样做浪费了空间,并且破坏了类属性的概述,如果它们如下图所示很多的话。你知道吗
我的类__init__
文档大致如下所示。因为属性是运行时定义的,所以我需要在Attributes
部分显式地记录它们。但在默认情况下,它们会被放在一个描述列表中,而不是一个表中。你知道吗
.. rubric:: Methods
.. autoautosummary:: htmdmol.molecule.Molecule
:methods:
.. rubric:: Attributes
Attributes
----------
numAtoms : int
Number of atoms in the Molecule
numFrames : int
Number of conformers / simulation frames in the Molecule
我试过在属性列表中寻找生成<dd> <dl>
元素的模板,但没有成功。如果有人能帮助我使Attributes
部分看起来和Methods
部分一样,我会非常高兴的。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐