From 2ce33dda13fd434f86575f00a0e90a6c264c638e Mon Sep 17 00:00:00 2001 From: fredrik-1 Date: Thu, 9 Aug 2018 15:02:38 +0200 Subject: [PATCH] adding show inheritance to autosummary template --- doc/_templates/autosummary.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/_templates/autosummary.rst b/doc/_templates/autosummary.rst index 8991f3c9ebc4..7d8860edd311 100644 --- a/doc/_templates/autosummary.rst +++ b/doc/_templates/autosummary.rst @@ -3,14 +3,22 @@ .. currentmodule:: {{ module }} + +{% if objtype in ['class'] %} +.. auto{{ objtype }}:: {{ objname }} + :show-inheritance: + +{% 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