Skip to content

Commit baa97f5

Browse files
committed
Clean up autosummary module template whitespace
1 parent 4c283a2 commit baa97f5

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

docs/source/_templates/autosummary-module.rst

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. automodule:: {{ fullname }}
44

55
{% block attributes %}
6-
{% if attributes %}
6+
{%- if attributes %}
77
.. rubric:: {{ _('Module Attributes') }}
88

99
.. autosummary::
@@ -12,10 +12,10 @@
1212
{{ item }}
1313
{%- endfor %}
1414
{% endif %}
15-
{% endblock %}
15+
{%- endblock %}
1616

17-
{% block functions %}
18-
{% if functions %}
17+
{%- block functions %}
18+
{%- if functions %}
1919
.. rubric:: {{ _('Functions') }}
2020

2121
.. autosummary::
@@ -24,10 +24,10 @@
2424
{{ item }}
2525
{%- endfor %}
2626
{% endif %}
27-
{% endblock %}
27+
{%- endblock %}
2828

29-
{% block classes %}
30-
{% if classes %}
29+
{%- block classes %}
30+
{%- if classes %}
3131
.. rubric:: {{ _('Classes') }}
3232

3333
.. autosummary::
@@ -37,10 +37,10 @@
3737
{{ item }}
3838
{%- endfor %}
3939
{% endif %}
40-
{% endblock %}
40+
{%- endblock %}
4141

42-
{% block exceptions %}
43-
{% if exceptions %}
42+
{%- block exceptions %}
43+
{%- if exceptions %}
4444
.. rubric:: {{ _('Exceptions') }}
4545

4646
.. autosummary::
@@ -49,4 +49,18 @@
4949
{{ item }}
5050
{%- endfor %}
5151
{% endif %}
52-
{% endblock %}
52+
{%- endblock %}
53+
54+
{%- block modules %}
55+
{%- if modules %}
56+
.. rubric:: Modules
57+
58+
.. autosummary::
59+
:toctree:
60+
:template: autosummary-module.rst
61+
:recursive:
62+
{% for item in modules %}
63+
{{ item }}
64+
{%- endfor %}
65+
{% endif %}
66+
{%- endblock %}

0 commit comments

Comments
 (0)