私は以下のことをどのように達成できるのでしょうか?私はnumpyのdocstringスタイルとsphinx autodocを組み合わせて自動化されたドキュメントを生成しています。しかし、私は出力にネストされたリストを有することをstruggelingだ:numpy docstringにネストされたリストをスフィンクスdocstringと組み合わせて正しく追加する方法
Attributes
----------
attribute 1: pandas data frame
* `index:` Array-like, integer valued representing
days. Has to be sorted and increasing.
* `dtype:` float64. Value of temperature.
* `columns:` location description, e.g. 'San Diego'
attribute 2: `int`
nice and sunny days in California
このドキュメント文字列の出力がオフに完了です。スフィンクスは完全な機能を認識し、独立してから二行目扱いしません。また、ここで
def generate_temp(self, n, freq, very_long_variable_name,
type_temp=None, method=None):
:これは、関数の記述が複数行にまたがる別のもののために属性1
ためのリストを認識しません最初。
フォーマットに問題がありますか?
'sphinx.ext.napoleon'(http://www.sphinx-doc.org/en/stable/ext/napoleon.html)を使用していますか? – mzjn
@mzjnはい、それは正しい、私はナポレオンを使用しています。 – math