Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to annotate a member as abstract in Sphinx documentation?

The following two property definitions show up exactly the same in Sphinx autodoc HTML output:

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

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

Does Sphinx have a way to annotate the abstract methods with some kind of identifier? I'd like it to be obvious in my documentation which members of my ABC are required to implement, and which are mixin freebies you get once the required ones are defined.

like image 763
cdwilson Avatar asked Jul 24 '13 17:07

cdwilson


1 Answers

It does not seem as if Sphinx is able to do that. It is marked as an open issue at Sphinx's bitbucket since 2011 and flagged as milestone for a future version of Sphinx.

like image 100
RickardSjogren Avatar answered Sep 19 '22 16:09

RickardSjogren