|
1 | | -{{ node.name }} |
2 | | -=={{ '=' * node.name|length }}== |
| 1 | +.. # Template modified by Patrick Lehmann |
| 2 | + * removed automodule on top, because private members are activated for autodoc (no doubled documentation). |
| 3 | + * Made sections like 'submodules' bold text, but no headlines to reduce number of ToC levels. |
3 | 4 |
|
4 | | -.. automodule:: {{ node.name }} |
| 5 | +=={{ '=' * node.name|length }}== |
| 6 | +``{{ node.name }}`` |
| 7 | +=={{ '=' * node.name|length }}== |
5 | 8 |
|
6 | 9 | {##} |
7 | 10 | {%- block modules -%} |
8 | 11 | {%- if subnodes %} |
9 | 12 |
|
10 | | -.. #----------------------------------- |
11 | | -{##} |
12 | 13 | **Submodules** |
13 | 14 |
|
| 15 | + |
14 | 16 | .. toctree:: |
15 | 17 | {% for item in subnodes %} |
16 | 18 | {{ item.name }} |
|
21 | 23 | {##} |
22 | 24 | .. currentmodule:: {{ node.name }} |
23 | 25 | {##} |
| 26 | +{%- block functions -%} |
| 27 | +{%- if node.functions %} |
24 | 28 |
|
25 | | -.. #----------------------------------- |
26 | | -{##} |
27 | | -{%- if node.variables %} |
28 | | -**Variables** |
29 | | -{##} |
30 | | -{% for item, obj in node.variables.items() -%} |
31 | | -- :py:data:`{{ item }}` |
32 | | -{% endfor -%} |
33 | | -{%- endif -%} |
34 | | - |
| 29 | +**Functions** |
35 | 30 |
|
36 | | -{%- if node.exceptions %} |
37 | | -{##} |
38 | | -**Exceptions** |
39 | | -{##} |
40 | | -{% for item, obj in node.exceptions.items() -%} |
41 | | -- :py:exc:`{{ item }}`: |
| 31 | +{% for item, obj in node.functions.items() -%} |
| 32 | +- :py:func:`{{ item }}`: |
42 | 33 | {{ obj|summary }} |
43 | 34 |
|
44 | 35 | {% endfor -%} |
45 | | -{%- endif -%} |
46 | 36 |
|
| 37 | +{% for item in node.functions %} |
| 38 | +.. autofunction:: {{ item }} |
| 39 | +{##} |
| 40 | +{%- endfor -%} |
| 41 | +{%- endif -%} |
| 42 | +{%- endblock -%} |
47 | 43 |
|
| 44 | +{%- block classes -%} |
48 | 45 | {%- if node.classes %} |
49 | | -{##} |
| 46 | + |
50 | 47 | **Classes** |
51 | | -{##} |
| 48 | + |
52 | 49 | {% for item, obj in node.classes.items() -%} |
53 | 50 | - :py:class:`{{ item }}`: |
54 | 51 | {{ obj|summary }} |
55 | 52 |
|
56 | 53 | {% endfor -%} |
57 | | -{%- endif -%} |
58 | 54 |
|
| 55 | +{% for item in node.classes %} |
| 56 | +.. autoclass:: {{ item }} |
| 57 | + :members: |
59 | 58 |
|
60 | | -{%- if node.functions %} |
61 | | -{##} |
62 | | -**Functions** |
63 | | -{##} |
64 | | -{% for item, obj in node.functions.items() -%} |
65 | | -- :py:func:`{{ item }}`: |
66 | | - {{ obj|summary }} |
67 | | - |
68 | | -{% endfor -%} |
69 | | -{%- endif -%} |
70 | | - |
71 | | - |
72 | | -{%- block variables -%} |
73 | | -{%- if node.variables %} |
74 | | -{% for item, obj in node.variables.items() %} |
75 | | -.. autodata:: {{ item }} |
76 | | - :annotation: |
77 | | - |
78 | | - .. code-block:: guess |
79 | | -
|
80 | | - {{ obj|pprint|indent(6) }} |
| 59 | + .. rubric:: Inheritance |
| 60 | + .. inheritance-diagram:: {{ item }} |
| 61 | + :parts: 1 |
81 | 62 | {##} |
82 | 63 | {%- endfor -%} |
83 | 64 | {%- endif -%} |
84 | 65 | {%- endblock -%} |
85 | 66 |
|
86 | | - |
87 | 67 | {%- block exceptions -%} |
88 | 68 | {%- if node.exceptions %} |
89 | 69 |
|
90 | | -.. #----------------------------------- |
91 | | -
|
92 | | -{% for item in node.exceptions %} |
93 | | -.. autoexception:: {{ item }} |
94 | | - :members: |
95 | | - :private-members: |
96 | | - :inherited-members: |
97 | | - :undoc-members: |
98 | | -{##} |
99 | | - .. rubric:: Inheritance |
100 | | - .. inheritance-diagram:: {{ item }} |
101 | | -{##} |
102 | | - .. rubric:: Members |
103 | | -{##} |
104 | | -{%- endfor -%} |
105 | | -{%- endif -%} |
106 | | -{%- endblock -%} |
| 70 | +**Exceptions** |
107 | 71 |
|
| 72 | +{% for item, obj in node.exceptions.items() -%} |
| 73 | +- :py:exc:`{{ item }}`: |
| 74 | + {{ obj|summary }} |
108 | 75 |
|
109 | | -{%- block classes -%} |
110 | | -{%- if node.classes %} |
| 76 | +{% endfor -%} |
111 | 77 |
|
112 | | -.. #----------------------------------- |
| 78 | +{% for item in node.exceptions %} |
| 79 | +.. autoexception:: {{ item }} |
113 | 80 |
|
114 | | -{% for item in node.classes %} |
115 | | -.. autoclass:: {{ item }} |
116 | | - :members: |
117 | | - :private-members: |
118 | | - :undoc-members: |
119 | | - :inherited-members: |
120 | | -{##} |
121 | 81 | .. rubric:: Inheritance |
122 | 82 | .. inheritance-diagram:: {{ item }} |
123 | 83 | :parts: 1 |
124 | | -{##} |
125 | | - .. rubric:: Members |
126 | 84 | {##} |
127 | 85 | {%- endfor -%} |
128 | 86 | {%- endif -%} |
129 | 87 | {%- endblock -%} |
130 | 88 |
|
| 89 | +{%- block variables -%} |
| 90 | +{%- if node.variables %} |
131 | 91 |
|
132 | | -{%- block functions -%} |
133 | | -{%- if node.functions %} |
| 92 | +**Variables** |
134 | 93 |
|
135 | | -.. #----------------------------------- |
| 94 | +{% for item, obj in node.variables.items() -%} |
| 95 | +- :py:data:`{{ item }}` |
| 96 | +{% endfor -%} |
136 | 97 |
|
137 | | -**Functions** |
| 98 | +{% for item, obj in node.variables.items() %} |
| 99 | +.. autodata:: {{ item }} |
| 100 | + :annotation: |
138 | 101 |
|
139 | | -{% for item in node.functions %} |
140 | | -.. autofunction:: {{ item }} |
| 102 | + .. code-block:: text |
| 103 | +
|
| 104 | + {{ obj|pprint|indent(6) }} |
141 | 105 | {##} |
142 | 106 | {%- endfor -%} |
143 | 107 | {%- endif -%} |
|
0 commit comments