Adding :members: in autoclass

13 views
Skip to first unread message

Danylo Ulianych

unread,
Sep 30, 2020, 11:01:54 AM9/30/20
to sphinx-users
Dear all,

I have an .rst file with only one line

.. automodule:: elephant.spike_train_processing

`elephant/spike_train_processing.py` contains

.. autosummary::
     :toctree: toctree/spike_train_processing/
     Synchrotool

which produces 

.. autoclass:: Synchrotool

but I want

.. autoclass:: Synchrotool
   :members:

How do I force :members: into each class throughout the whole python package?

Thank you.
Danylo

Komiya Takeshi

unread,
Oct 1, 2020, 10:49:34 AM10/1/20
to sphinx...@googlegroups.com
Hi,

How about using `autodoc_default_options`? It can pass :members:
option to all of auto* definitions in your document.
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_default_options

Thanks,
Takeshi KOMIYA

2020年10月1日(木) 0:01 Danylo Ulianych <diz...@gmail.com>:
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/ba030079-4abb-4729-a3c7-d0f41c9d4c5cn%40googlegroups.com.

Danylo Ulianych

unread,
Oct 2, 2020, 7:05:50 AM10/2/20
to sphinx-users
Do you mean 

.. automodule:: elephant.spike_train_processing
   :members:
?
Doing so will compile all functions documentation below the short description, I don't want that. What I want is to ':members:' for autoclass only.
Thank you.
Reply all
Reply to author
Forward
0 new messages