【问题标题】:How to annotate a member as abstract in Sphinx documentation?如何在 Sphinx 文档中将成员注释为摘要?
【发布时间】:2013-07-24 08:39:15
【问题描述】:

以下两个属性定义在 Sphinx autodoc HTML 输出中显示完全相同:

@property
def concrete(self):
    """This is the concrete docstring"""
    pass

@abstractproperty
def abstract(self):
    """This is the abstract docstring"""
    pass

Sphinx 有没有办法用某种标识符来注释抽象方法?我希望在我的文档中清楚地表明我的 ABC 的哪些成员需要实现,以及在定义了所需的那些成员后,你会获得哪些 mixin 免费赠品。

【问题讨论】:

    标签: python python-sphinx python-decorators autodoc abc


    【解决方案1】:

    Sphinx 似乎无法做到这一点。自 2011 年以来,它在 Sphinx's bitbucket 被标记为未解决问题,并被标记为 Sphinx 未来版本的里程碑。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多