diff --git a/docs/_templates/autosummary/class.rst b/docs/_templates/autosummary/class.rst index a63062a73..26837c0a4 100644 --- a/docs/_templates/autosummary/class.rst +++ b/docs/_templates/autosummary/class.rst @@ -15,14 +15,10 @@ {% block attributes_summary %} {% if attributes %} - .. rubric:: Attributes - - .. autosummary:: - :toctree: ../stubs/ {% for item in all_attributes %} {%- if not item.startswith('_') %} - ~{{ name }}.{{ item }} + .. autoattribute:: {{ name }}.{{ item }} {%- endif -%} {%- endfor %} {% endif %} @@ -30,16 +26,11 @@ {% block methods_summary %} {% if methods %} - .. rubric:: Methods - - .. autosummary:: - :toctree: ../stubs/ {% for item in all_methods %} {%- if not item.startswith('_') %} - ~{{ name }}.{{ item }} + .. automethod:: {{ name }}.{{ item }} {%- endif -%} {%- endfor %} - {% endif %} {% endblock %} diff --git a/docs/_templates/autosummary/class_no_inherited_members.rst b/docs/_templates/autosummary/class_no_inherited_members.rst index 0e83ca902..58df844b8 100644 --- a/docs/_templates/autosummary/class_no_inherited_members.rst +++ b/docs/_templates/autosummary/class_no_inherited_members.rst @@ -15,15 +15,11 @@ {% block attributes_summary %} {% if attributes %} - .. 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 %} @@ -32,18 +28,13 @@ {% block methods_summary %} {% if methods %} - .. 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 %} - {% endif %} {% endblock %} diff --git a/docs/conf.py b/docs/conf.py index c245e130c..91066b217 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -93,6 +93,7 @@ "nbsphinx", "sphinx.ext.intersphinx", "qiskit_sphinx_theme", + "matplotlib.sphinxext.plot_directive", ] html_static_path = ["_static"] templates_path = ["_templates"]