私はいくつかの appengine モデルと autodoc を使用しています。ただし、属性を適用するためのドキュメントを取得する方法が見つかりません。私はNDBを使用しており、ドキュメントをSphinxで構築しています。
たとえば、次のモデルを使用します。
class Greeting(ndb.Model):
"""Models an individual Guestbook entry with content and date."""
content = ndb.StringProperty()
date = ndb.DateTimeProperty(auto_now_add=True)
コンテンツの結果のdocstringは次のとおりです
値が制限された長さのテキスト文字列であるインデックス付きプロパティ
私は次のアプローチを試しました:
"The content"
content = ndb.StringProperty()
content = ndb.StringProperty()
"The content"
#: the content
content = ndb.StringProperty()
content = ndb.StringProperty()
content.__doc__="The content"
content = ndb.StringProperty(__doc__="the content")
content = ndb.StringProperty(doc="the content")
それらのどれもエラーを出さず、機能しません-私は常に「インデックス付きプロパティ...」を取得します。__doc__ を明示的に設定しても効果がないことに驚いています。
自分のdocstringを使用する方法はありますか?