From 66d0297330ec1a25f773197f6e8262c06b69b79d Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 28 Nov 2019 09:04:21 +0000 Subject: [PATCH 1/3] Try documenting inherited memebers --- doc/conf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index bcb6d93a51b4..7b4d79223729 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -101,9 +101,10 @@ def _check_dependencies(): autodoc_docstring_signature = True if sphinx.version_info < (1, 8): - autodoc_default_flags = ['members', 'undoc-members'] + autodoc_default_flags = ['members', 'undoc-members', 'inherited-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 From 68c6593824a096257a2a61293b380ac43bae1fc2 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 28 Nov 2019 09:04:34 +0000 Subject: [PATCH 2/3] Remove sphinx<1.8 code path --- doc/conf.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 7b4d79223729..a7e3eb520700 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -100,11 +100,8 @@ def _check_dependencies(): autosummary_generate = True autodoc_docstring_signature = True -if sphinx.version_info < (1, 8): - autodoc_default_flags = ['members', 'undoc-members', 'inherited-members'] -else: - autodoc_default_options = {'members': None, 'undoc-members': None, - 'inherited-members': True} +autodoc_default_options = {'members': None, 'undoc-members': None, + 'inherited-members': True} nitpicky = True # change this to True to update the allowed failures From 09e31190d277e30088ce528a58751afbe30376b7 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 2 Dec 2019 17:41:12 +0000 Subject: [PATCH 3/3] Try selective not inheriting members for axisartist and axes_grid1 --- doc/_templates/autosummary.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/_templates/autosummary.rst b/doc/_templates/autosummary.rst index 80c7004c40c4..353116cb985b 100644 --- a/doc/_templates/autosummary.rst +++ b/doc/_templates/autosummary.rst @@ -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