I have a three-layered class structure like this:
class Super(object):
"""This class is documented."""
class Intermediate(Super):
pass
class Sub(Intermediate):
"""This is also documented."""
My index.rst
file looks as follows:
.. automodule:: mymodule
:show-inheritance:
:inherited-members:
Sphinx generates a nice API documentation for me. It includes the classes Super
and Sub
, with the appropriate comments. It does not include Intermediate
, because it doesn't have a comment and I did not supply the undoc-members
flag. This is because I don't want Intermediate
to show up in the documentation.
My problem is this: Because I supply the show-inheritance
flag, Sphinx displays the bases for each class; object
for Super
and Intermediate
for Sub
. Since Intermediate
is undocumented, I do not want it to show up in the list of base classes. Instead, I'd like Sphinx to display the next documented class up in the inheritance tree, Super
. In other words: I want Sphinx to display Super
, not Intermediate
as the base class of Sub
.
Does anybody know how to do this?
pyserial
. I extendedserial.Serial
, which is just a front for one of the concrete implementations for each supported platform. I wanted the docs to showserial.Serial
as my base, but instead it shows something likeserial.posixserial.Serial
, with no link since it is not officially documented. – Taunt:exclude-members: Intermediate
? – Taunt