Skip to content

All identifiers should be passed to autodoc-skip-member, even if not in __all__ #8119

@jkugler

Description

@jkugler

Is your feature request related to a problem? Please describe.
I have a Python project for which I've generated docs. It did well. Almost everything was doc'ed. I knew about the default of excluding anything starting with '_' so I created an autodoc-skip-member function that would include those. It works. I see a bunch of private methods and functions included.

But...I have a module, let's call it XYZ that has both private and public functions. Sphinx is only doc'ing the public functions of XYZ, but not its private functions. I have other modules that have private functions, and it's doc'ing those .I added a print() to the autodoc-skip-member function and it doesn't even print out the name of those private functions so it seems it's not even seeing it.

I figured it out. The module had certain identifiers listed in __all__, and was not passing anything else in that module to autodoc-skip-member.

Describe the solution you'd like
Sphinx should pass through all members, not just the ones in __all__. Maybe add something to the options object that is passed to autodoc-skip-members that indicates it would have been excluded by the __all__ designator, or some such.

Describe alternatives you've considered
I simply removed the __all__ from the file.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions