-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
I'm having an issue where in module.rst template I do the following:
{% for item in classes %}
.. autoclass:: {{ item }}
:members:
{%- endfor %}
But some imported object are not being filtered out. I checked the implementation:
https://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/autosummary/generate.py#L167
And this function is not considering the __all__ attribute for modules to determine the public objects.
The main issue is because I tried the following:
.. autosummary::
:toctree: _reference
{% for item in classes %}
{{ item }}
{%- endfor %}
To try to generate a recursive page for each class.
The problem is that the page gets generated, but the autosummary directive does check if the object is truly public (considering __all__, i think here) and thus it doesn't output that entry to the toctree, causing a build error when running with -W because the generated *.rst file doesn't belong to any toctree.
Regards.