Skip to content

Commit 644f863

Browse files
committed
[no ci] docs: separate page for module functions
1 parent e584fc3 commit 644f863

File tree

2 files changed

+23
-33
lines changed

2 files changed

+23
-33
lines changed

docsrc/source/_templates/custom-class-template.rst renamed to docsrc/source/_templates/base.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
{{ objname | escape | underline}}
2-
1+
{{ objname | escape | underline(line="=") }}
32

43
{% if objtype == "function" -%}
54

@@ -13,8 +12,8 @@
1312

1413
.. autoclass:: {{ objname }}
1514
:members:
16-
:undoc-members:
17-
:no-inherited-members:
15+
:inherited-members:
16+
:show-inheritance:
1817
:special-members: __call__
1918
:member-order: bysource
2019

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
{{ objname | escape | underline}}
22

33
.. automodule:: {{ fullname }}
4+
:member-order: alphabetical
5+
6+
{% block modules %}
7+
{% if modules %}
8+
.. rubric:: Modules
9+
10+
.. autosummary::
11+
:toctree:
12+
:template: custom-module-template.rst
13+
:recursive:
14+
{% for item in modules %}
15+
{{ item }}
16+
{%- endfor %}
17+
18+
{% endif %}
19+
{% endblock %}
420

521
{% block attributes %}
622
{% if attributes %}
@@ -18,6 +34,8 @@
1834
.. rubric:: {{ _('Functions') }}
1935

2036
.. autosummary::
37+
:toctree:
38+
:template: base.rst
2139
{% for item in functions %}
2240
{{ item }}
2341
{%- endfor %}
@@ -30,7 +48,7 @@
3048

3149
.. autosummary::
3250
:toctree:
33-
:template: custom-class-template.rst
51+
:template: base.rst
3452
{% for item in classes %}
3553
{{ item }}
3654
{%- endfor %}
@@ -43,28 +61,13 @@
4361

4462
.. autosummary::
4563
:toctree:
46-
:template: custom-class-template.rst
64+
:template: base.rst
4765
{% for item in exceptions %}
4866
{{ item }}
4967
{%- endfor %}
5068
{% endif %}
5169
{% endblock %}
5270

53-
{% block modules %}
54-
{% if modules %}
55-
.. rubric:: Modules
56-
57-
.. autosummary::
58-
:toctree:
59-
:template: custom-module-template.rst
60-
:recursive:
61-
{% for item in modules %}
62-
{{ item }}
63-
{%- endfor %}
64-
65-
{% endif %}
66-
{% endblock %}
67-
6871
{% block attributes_def %}
6972
{% if attributes %}
7073
.. rubric:: Module Attributes
@@ -75,15 +78,3 @@
7578
{%- endfor %}
7679
{% endif %}
7780
{% endblock %}
78-
79-
{% block functions_def %}
80-
{% if functions %}
81-
82-
.. rubric:: {{ _('Functions') }}
83-
84-
{% for item in functions %}
85-
.. autofunction:: {{ item }}
86-
87-
{%- endfor %}
88-
{% endif %}
89-
{% endblock %}

0 commit comments

Comments
 (0)