Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 454d24e

Browse files
committed
adding show inheritance to autosummary template
1 parent fe6ee82 commit 454d24e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

doc/_templates/autosummary.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@
33

44
.. currentmodule:: {{ module }}
55

6+
7+
{% if objtype in ['class', 'module'] %}
8+
.. auto{{ objtype }}:: {{ objname }}
9+
:show-inheritance:
10+
11+
{% else %}
612
.. auto{{ objtype }}:: {{ objname }}
713
14+
{% endif %}
15+
816
{% if objtype in ['class', 'method', 'function'] %}
917
{% if objname in ['AxesGrid', 'Scalable', 'HostAxes', 'FloatingAxes',
1018
'ParasiteAxesAuxTrans', 'ParasiteAxes'] %}
1119
.. Filter out the above aliases to other classes, as sphinx gallery
1220
creates no example file for those (sphinx-gallery/sphinx-gallery#365)
13-
21+
1422
{% else %}
1523
.. include:: {{module}}.{{objname}}.examples
1624

0 commit comments

Comments
 (0)