Skip to content

Commit cddfbbb

Browse files
authored
Move methods into class pages for docs (#563)
1 parent d6cb5fc commit cddfbbb

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

docs/_templates/autosummary/class.rst

+2-6
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818

1919
.. rubric:: Attributes
2020

21-
.. autosummary::
22-
:toctree: ../stubs/
2321
{% for item in all_attributes %}
2422
{%- if not item.startswith('_') %}
25-
~{{ name }}.{{ item }}
23+
.. autoattribute:: {{ name }}.{{ item }}
2624
{%- endif -%}
2725
{%- endfor %}
2826
{% endif %}
@@ -33,11 +31,9 @@
3331

3432
.. rubric:: Methods
3533

36-
.. autosummary::
37-
:toctree: ../stubs/
3834
{% for item in all_methods %}
3935
{%- if not item.startswith('_') %}
40-
~{{ name }}.{{ item }}
36+
.. automethod:: {{ name }}.{{ item }}
4137
{%- endif -%}
4238
{%- endfor %}
4339

docs/_templates/autosummary/class_no_inherited_members.rst

+2-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818

1919
.. rubric:: Attributes
2020

21-
.. autosummary::
22-
:toctree: ../stubs/
2321
{% for item in all_attributes %}
2422
{%- if item not in inherited_members %}
2523
{%- if not item.startswith('_') %}
26-
~{{ name }}.{{ item }}
24+
.. autoattribute:: {{ name }}.{{ item }}
2725
{%- endif -%}
2826
{%- endif %}
2927
{%- endfor %}
@@ -35,12 +33,10 @@
3533

3634
.. rubric:: Methods
3735

38-
.. autosummary::
39-
:toctree: ../stubs/
4036
{% for item in all_methods %}
4137
{%- if item not in inherited_members %}
4238
{%- if not item.startswith('_') %}
43-
~{{ name }}.{{ item }}
39+
.. automethod:: {{ name }}.{{ item }}
4440
{%- endif -%}
4541
{%- endif %}
4642
{%- endfor %}

0 commit comments

Comments
 (0)