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