|
| 1 | +{% if not obj.display %} |
| 2 | +:orphan: |
| 3 | + |
| 4 | +{% endif %} |
| 5 | +:mod:`{{ obj.name }}` |
| 6 | +======={{ "=" * obj.name|length }} |
| 7 | + |
| 8 | +.. py:module:: {{ obj.name }} |
| 9 | +
|
| 10 | +{% if obj.docstring %} |
| 11 | +.. autoapi-nested-parse:: |
| 12 | + |
| 13 | + {{ obj.docstring|prepare_docstring|indent(3) }} |
| 14 | + |
| 15 | +{% endif %} |
| 16 | + |
| 17 | +{% block subpackages %} |
| 18 | +{% set visible_subpackages = obj.subpackages|selectattr("display")|list %} |
| 19 | +{% if visible_subpackages %} |
| 20 | +.. toctree:: |
| 21 | + :titlesonly: |
| 22 | + :maxdepth: 3 |
| 23 | + |
| 24 | +{% for subpackage in visible_subpackages %} |
| 25 | + {{ subpackage.short_name }}/index.rst |
| 26 | +{% endfor %} |
| 27 | + |
| 28 | + |
| 29 | +{% endif %} |
| 30 | +{% endblock %} |
| 31 | +{% block submodules %} |
| 32 | +{% set visible_submodules = obj.submodules|selectattr("display")|list %} |
| 33 | +{% if visible_submodules %} |
| 34 | + |
| 35 | +.. toctree:: |
| 36 | + :titlesonly: |
| 37 | + :maxdepth: 1 |
| 38 | + |
| 39 | +{% for submodule in visible_submodules %} |
| 40 | + {{ submodule.short_name }}/index.rst |
| 41 | +{% endfor %} |
| 42 | + |
| 43 | + |
| 44 | +{% endif %} |
| 45 | +{% endblock %} |
| 46 | +{% block content %} |
| 47 | +{% if obj.all is not none %} |
| 48 | +{% set visible_children = obj.children|selectattr("short_name", "in", obj.all)|list %} |
| 49 | +{% elif obj.type is equalto("package") %} |
| 50 | +{% set visible_children = obj.children|selectattr("display")|list %} |
| 51 | +{% else %} |
| 52 | +{% set visible_children = obj.children|selectattr("display")|rejectattr("imported")|list %} |
| 53 | +{% endif %} |
| 54 | +{% if visible_children %} |
| 55 | + |
| 56 | +{% set visible_classes = visible_children|selectattr("type", "equalto", "class")|list %} |
| 57 | +{% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %} |
| 58 | +{% if "show-module-summary" in autoapi_options and (visible_classes or visible_functions) %} |
| 59 | +{% block classes %} |
| 60 | +{% if visible_classes %} |
| 61 | +Classes |
| 62 | +~~~~~~~ |
| 63 | + |
| 64 | +.. autoapisummary:: |
| 65 | + |
| 66 | +{% for klass in visible_classes %} |
| 67 | + {{ klass.id }} |
| 68 | +{% endfor %} |
| 69 | + |
| 70 | + |
| 71 | +{% endif %} |
| 72 | +{% endblock %} |
| 73 | + |
| 74 | +{% block functions %} |
| 75 | +{% if visible_functions %} |
| 76 | +Functions |
| 77 | +~~~~~~~~~ |
| 78 | + |
| 79 | +.. autoapisummary:: |
| 80 | + |
| 81 | +{% for function in visible_functions %} |
| 82 | + {{ function.id }} |
| 83 | +{% endfor %} |
| 84 | + |
| 85 | + |
| 86 | +{% endif %} |
| 87 | +{% endblock %} |
| 88 | +{% endif %} |
| 89 | +{% for obj_item in visible_children %} |
| 90 | +{{ obj_item.rendered|indent(0) }} |
| 91 | +{% endfor %} |
| 92 | +{% endif %} |
| 93 | +{% endblock %} |
0 commit comments