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

special-members with inherited-members shows all default special methods #5923

Closed
pitrou opened this issue Jan 10, 2019 · 3 comments
Closed
Labels
Milestone

Comments

@pitrou
Copy link

pitrou commented Jan 10, 2019

When using special-members together with inherited-members, the default versions of special methods which were not specialized are shown, which means the doc for even the simplest class will list all special methods such as __len__, etc. (with a docstring such as "Return len(self).").

It would be nice if autodoc could detect that a special method was not defined and skip documenting it.

@tk0miya tk0miya added this to the 2.1.0 milestone Feb 10, 2019
@tk0miya
Copy link
Member

tk0miya commented Feb 10, 2019

+1; Acceptable. IMO, it would be better not to display special methods defined in object class. I suppose nobody expects to display them.

@tk0miya tk0miya modified the milestones: 2.1.0, 2.0.0 Feb 10, 2019
@tk0miya tk0miya modified the milestones: 2.1.0, 2.2.0 Jun 2, 2019
@tk0miya tk0miya modified the milestones: 2.2.0, 2.3.0 Aug 18, 2019
tk0miya added a commit to tk0miya/sphinx that referenced this issue Nov 30, 2019
@tk0miya tk0miya modified the milestones: 2.3.0, 3.0.0 Nov 30, 2019
@tk0miya
Copy link
Member

tk0miya commented Nov 30, 2019

I posted #6873 for this. But it brings incompatible changes to :inherited-members: option. So I'd like to merge it to 3.0 release.

tk0miya added a commit that referenced this issue Dec 22, 2019
…can_ignore_specific_superclass

Close #5923: autodoc: allow not to document inherited members of specific super class
@tk0miya
Copy link
Member

tk0miya commented Dec 22, 2019

Now #6873 is merged. I hope this helps your case. Thanks,

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants