Skip to content

Try documenting inherited class members #15780

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions doc/_templates/autosummary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@

.. currentmodule:: {{ module }}


{% if objtype in ['class'] %}
{% if module in ['mpl_toolkits.axes_grid1.mpl_axes',
'mpl_toolkits.axisartist.axislines',
'mpl_toolkits.mplot3d.axis3d'] %}
.. auto{{ objtype }}:: {{ objname }}
:show-inheritance:
:no-inherited-members:
{% else %}
.. auto{{ objtype }}:: {{ objname }}
:show-inheritance:
{% endif %}

{% else %}
.. auto{{ objtype }}:: {{ objname }}

{% endif %}

{% if objtype in ['class', 'method', 'function'] %}
{% if objname in ['AxesGrid', 'Scalable', 'HostAxes', 'FloatingAxes',
'ParasiteAxesAuxTrans', 'ParasiteAxes'] %}
.. Filter out the above aliases to other classes, as sphinx gallery
creates no example file for those (sphinx-gallery/sphinx-gallery#365)

{% else %}
.. include:: {{module}}.{{objname}}.examples

Expand Down
6 changes: 2 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,8 @@ def _check_dependencies():
autosummary_generate = True

autodoc_docstring_signature = True
if sphinx.version_info < (1, 8):
autodoc_default_flags = ['members', 'undoc-members']
else:
autodoc_default_options = {'members': None, 'undoc-members': None}
autodoc_default_options = {'members': None, 'undoc-members': None,
'inherited-members': True}

nitpicky = True
# change this to True to update the allowed failures
Expand Down