Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autodoc: :members: list causes :special-members: not to be shown #2401

Closed
andy-maier opened this issue Mar 29, 2016 · 2 comments
Closed

autodoc: :members: list causes :special-members: not to be shown #2401

andy-maier opened this issue Mar 29, 2016 · 2 comments

Comments

@andy-maier
Copy link

In a autoclass statement, when its :members: option specifies a list of members to show, the special members are no longer shown.

This fragment in index.rst will show all public non-special members and the two listed special members in the output:

.. autoclass:: mypackage.MyClass
   :members:
   :special-members: __str__, __repr__

While this one produces the failure by showing the specified public members but no more special members in the output:

.. autoclass:: mypackage.MyClass
   :members: method1, method2
   :special-members: __str__, __repr__

I am using Sphinx 1.4 on CentOS 6.7.
Let me know in case you need more data.

@tk0miya tk0miya added this to the 1.8.0 milestone Aug 27, 2018
@tk0miya
Copy link
Member

tk0miya commented Aug 27, 2018

It seems the argument for :special-members: is ignored when the argument for :members: is given.
I think this is a bug of autodoc module.

As a workaround, you can specify special members to :members::

.. autoclass:: mypackage.MyClass
   :members: method1, method2, __str__, __repr__

tk0miya added a commit to tk0miya/sphinx that referenced this issue Sep 2, 2018
tk0miya added a commit to tk0miya/sphinx that referenced this issue Sep 2, 2018
tk0miya added a commit to tk0miya/sphinx that referenced this issue Sep 2, 2018
tk0miya added a commit to tk0miya/sphinx that referenced this issue Sep 2, 2018
tk0miya added a commit that referenced this issue Sep 5, 2018
…cial_members

Fix #2401: autodoc: ``:members:`` causes ``:special-members:`` not to be shown
@tk0miya
Copy link
Member

tk0miya commented Sep 5, 2018

Fixed by #5376.
Thank you for reporting.

@tk0miya tk0miya closed this as completed Sep 5, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants