sphinx not showing inherited members

961 views
Skip to first unread message

Martin Luessi

unread,
Jun 16, 2014, 10:56:24 AM6/16/14
to sphinx...@googlegroups.com
Hi,

We have been using sphinx to build the documentation for our project (http://martinos.org/mnel) with great success. One problem we currently have is that inherited members in classes are not documented even though the "inherited-members" autodoc option is enabled. Does anyone know what could be causing this? The issue for this problem is here: https://github.com/mne-tools/mne-python/pull/1364

Best,

Martin

Takayuki Shimizukawa

unread,
Jun 16, 2014, 8:40:58 PM6/16/14
to sphinx...@googlegroups.com
Hi,

I've commented to github PR you mentioned.
`:inherited-members:` option should be placed before some directive contents.

And a `autodoc_default_flags = ['members', 'inherited-members']`
conf.py parameter also works fine to me.

Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sphinx-users...@googlegroups.com.
> To post to this group, send email to sphinx...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

Martin Luessi

unread,
Jun 17, 2014, 5:22:53 AM6/17/14
to sphinx...@googlegroups.com
Thanks, I tried what you suggested and unfortunately it doesn't help. Also, we have autodoc_default_flags = ['members', 'inherited-members']` set, so it is strange that inherited members are not shown. If I set "show-inheriatnce", autodoc show the correct base class. So it definitely knows what the base class is but for reason it doesn't document the members inherited from it.

Gary Pajer

unread,
Jan 19, 2015, 1:51:01 PM1/19/15
to sphinx...@googlegroups.com
I also have this issue.  "inherited-members" causes a link to the superclass to be included in the docs.  My problem (and the OP, if I understand it correctly) is that I want the documentation (or at least mention and  a link) of the inherited methods' docs to be displayed in the docs for the sub-class.   I don't want to climb the inheritance tree and examine each superclass in turn.  (doxygen and/or javadocs have this capablilty, I think.)

Gary Pajer

unread,
Jan 27, 2015, 10:09:07 AM1/27/15
to sphinx...@googlegroups.com
So correct me if I'm wrong:  sphinx-autodoc provides api documentation for classes, but that documentation can not list all methods callable from the class.

Is that intentional?  To me it appears to make the whole exercise futile.   The resulting docs are at best difficult to use, and at worst incomplete.

Consider this a feature request!
Reply all
Reply to author
Forward
0 new messages