Excluding particular base classes from autodoc inherited-members

1,144 views
Skip to first unread message

Jake Vanderplas

unread,
Sep 15, 2016, 11:41:01 AM9/15/16
to sphinx...@googlegroups.com
Hi all,
I hope to use autodoc for a project I'm working on. Most of my classes inherit from some very low-level base classes, whose methods I don't want in the documentation.

Unfortunately, there are some other parent classes whose methods I *do* want documented, so simply excluding autodoc's :inherited-members: is not an option.

Is there a way to specify particular base classes to exclude when using autodoc's :inherited-members: option? If not, I'll probably end up forking autodoc to extend it this way... thanks!
   Jake

Komiya Takeshi

unread,
Sep 21, 2016, 4:33:47 AM9/21/16
to sphinx-users
Hi Jake,

As far as I know, there are no option to do that.

Thanks,

2016年9月16日金曜日 0時41分01秒 UTC+9 Jake:

Jake Vanderplas

unread,
Sep 21, 2016, 11:45:34 AM9/21/16
to sphinx...@googlegroups.com
Thanks Komiya,

In case anyone comes across this thread, what I ended up doing was creating a custom Documenter for the objects in question which injects an :exclude-members: option that explicitly lists every member of the base class. A bit clunky, maybe, but it works.

   Jake

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to sphinx...@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages