Skip to content

Commit

Permalink
Move methods into class pages for docs (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaucasau authored Oct 17, 2023
1 parent b7c4600 commit e1d9c68
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,35 @@
.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:show-inheritance:
:no-members:
:no-inherited-members:
:no-special-members:

{% 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 %}
{% endblock %}

{% block methods_summary %}
{% if methods %}

.. rubric:: Methods

.. autosummary::
:toctree: ../stubs/
{% for item in all_methods %}
{%- if not item.startswith('_') or item in ['__call__', '__mul__', '__getitem__', '__len__'] %}
{{ name }}.{{ item }}
{%- if item not in inherited_members %}
{%- if not item.startswith('_') or item in ['__call__', '__mul__', '__getitem__', '__len__'] %}
.. automethod:: {{ name }}.{{ item }}
{%- endif -%}
{%- endif -%}
{%- endfor %}
{% for item in inherited_members %}
{%- if item in ['__call__', '__mul__', '__getitem__', '__len__'] %}
{{ name }}.{{ item }}
.. automethod:: {{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}

Expand Down

0 comments on commit e1d9c68

Please sign in to comment.