From cddfbbbaf529a8162e9a3180b31b38d7190650e5 Mon Sep 17 00:00:00 2001 From: Arnau Casau <47946624+arnaucasau@users.noreply.github.com> Date: Fri, 13 Oct 2023 09:03:02 +0200 Subject: [PATCH] Move methods into class pages for docs (#563) --- docs/_templates/autosummary/class.rst | 8 ++------ .../_templates/autosummary/class_no_inherited_members.rst | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/_templates/autosummary/class.rst b/docs/_templates/autosummary/class.rst index a63062a73..14c2d7a84 100644 --- a/docs/_templates/autosummary/class.rst +++ b/docs/_templates/autosummary/class.rst @@ -18,11 +18,9 @@ .. rubric:: Attributes - .. autosummary:: - :toctree: ../stubs/ {% for item in all_attributes %} {%- if not item.startswith('_') %} - ~{{ name }}.{{ item }} + .. autoattribute:: {{ name }}.{{ item }} {%- endif -%} {%- endfor %} {% endif %} @@ -33,11 +31,9 @@ .. rubric:: Methods - .. autosummary:: - :toctree: ../stubs/ {% for item in all_methods %} {%- if not item.startswith('_') %} - ~{{ name }}.{{ item }} + .. automethod:: {{ name }}.{{ item }} {%- endif -%} {%- endfor %} diff --git a/docs/_templates/autosummary/class_no_inherited_members.rst b/docs/_templates/autosummary/class_no_inherited_members.rst index 0e83ca902..0ba35e8c4 100644 --- a/docs/_templates/autosummary/class_no_inherited_members.rst +++ b/docs/_templates/autosummary/class_no_inherited_members.rst @@ -18,12 +18,10 @@ .. rubric:: Attributes - .. autosummary:: - :toctree: ../stubs/ {% for item in all_attributes %} {%- if item not in inherited_members %} {%- if not item.startswith('_') %} - ~{{ name }}.{{ item }} + .. autoattribute:: {{ name }}.{{ item }} {%- endif -%} {%- endif %} {%- endfor %} @@ -35,12 +33,10 @@ .. rubric:: Methods - .. autosummary:: - :toctree: ../stubs/ {% for item in all_methods %} {%- if item not in inherited_members %} {%- if not item.startswith('_') %} - ~{{ name }}.{{ item }} + .. automethod:: {{ name }}.{{ item }} {%- endif -%} {%- endif %} {%- endfor %}