Debian Codegraph @

core/docs/source/_apidoc_templates/package.rst_t

raw
1 {%- macro automodule(modname, options) -%}
2 .. automodule:: {{ modname }}
3 {%- for option in options %}
4 :{{ option }}:
5 {%- endfor %}
6 {%- endmacro %}
7
8 {%- macro toctree(docnames) -%}
9 .. toctree::
10 :maxdepth: {{ maxdepth }}
11 {% for docname in docnames %}
12 {{ docname }}
13 {%- endfor %}
14 {%- endmacro %}
15
16 {%- if is_namespace %}
17 {{- [pkgname, "namespace"] | join(" ") | e | heading }}
18 {% else %}
19 {{- [pkgname, "package"] | join(" ") | e | heading }}
20 {% endif %}
21
22 {%- if modulefirst and not is_namespace %}
23 {{ automodule(pkgname, automodule_options) }}
24 {% endif %}
25
26 {%- if subpackages %}
27 Subpackages
28 -----------
29
30 {{ toctree(subpackages) }}
31 {% endif %}
32
33 {%- if submodules %}
34 Submodules
35 ----------
36 {% if separatemodules %}
37 {{ toctree(submodules) }}
38 {% else %}
39 {%- for submodule in submodules %}
40 {% if show_headings %}
41 {{- [submodule, "module"] | join(" ") | e | heading(2) }}
42 {% endif %}
43 {{ automodule(submodule, automodule_options) }}
44 {% endfor %}
45 {%- endif %}
46 {%- endif %}
47
48 {%- if not modulefirst and not is_namespace %}
49 Module contents
50 ---------------
51
52 {{ automodule(pkgname, automodule_options) }}
53 {% endif %}