|
| 1 | +{% import 'macros.rst' as macros %} |
| 2 | +{% if obj.display %} |
| 3 | + {% if is_own_page %} |
| 4 | +{{ obj.id }} |
| 5 | +{{ "=" * obj.id|length }} |
| 6 | + |
| 7 | +.. py:module:: {{ obj.name }} |
| 8 | +
|
| 9 | + {% if obj.docstring %} |
| 10 | +.. autoapi-nested-parse:: |
| 11 | + |
| 12 | + {{ obj.docstring|indent(3) }} |
| 13 | + |
| 14 | + {% endif %} |
| 15 | + |
| 16 | + {% block submodules %} |
| 17 | + {% set visible_subpackages = obj.subpackages|selectattr("display")|list %} |
| 18 | + {% set visible_submodules = obj.submodules|selectattr("display")|list %} |
| 19 | + {% set visible_submodules = (visible_subpackages + visible_submodules)|sort %} |
| 20 | + {% if visible_submodules %} |
| 21 | +Submodules |
| 22 | +---------- |
| 23 | + |
| 24 | +.. toctree:: |
| 25 | + :maxdepth: 1 |
| 26 | + |
| 27 | + {% for submodule in visible_submodules %} |
| 28 | + {{ submodule.include_path }} |
| 29 | + {% endfor %} |
| 30 | + |
| 31 | + |
| 32 | + {% endif %} |
| 33 | + {% endblock %} |
| 34 | + {% block content %} |
| 35 | + {% set visible_children = obj.children|selectattr("display")|list %} |
| 36 | + {% if visible_children %} |
| 37 | + {% set visible_attributes = visible_children|selectattr("type", "equalto", "data")|list %} |
| 38 | + {% if visible_attributes %} |
| 39 | + {% if "attribute" in own_page_types or "show-module-summary" in autoapi_options %} |
| 40 | +Attributes |
| 41 | +---------- |
| 42 | + |
| 43 | + {% if "attribute" in own_page_types %} |
| 44 | +.. toctree:: |
| 45 | + :hidden: |
| 46 | + |
| 47 | + {% for attribute in visible_attributes %} |
| 48 | + {{ attribute.include_path }} |
| 49 | + {% endfor %} |
| 50 | + |
| 51 | + {% endif %} |
| 52 | +.. autoapisummary:: |
| 53 | + |
| 54 | + {% for attribute in visible_attributes %} |
| 55 | + {{ attribute.id }} |
| 56 | + {% endfor %} |
| 57 | + {% endif %} |
| 58 | + |
| 59 | + |
| 60 | + {% endif %} |
| 61 | + {% set visible_exceptions = visible_children|selectattr("type", "equalto", "exception")|list %} |
| 62 | + {% if visible_exceptions %} |
| 63 | + {% if "exception" in own_page_types or "show-module-summary" in autoapi_options %} |
| 64 | +Exceptions |
| 65 | +---------- |
| 66 | + |
| 67 | + {% if "exception" in own_page_types %} |
| 68 | +.. toctree:: |
| 69 | + :hidden: |
| 70 | + |
| 71 | + {% for exception in visible_exceptions %} |
| 72 | + {{ exception.include_path }} |
| 73 | + {% endfor %} |
| 74 | + |
| 75 | + {% endif %} |
| 76 | +.. autoapisummary:: |
| 77 | + |
| 78 | + {% for exception in visible_exceptions %} |
| 79 | + {{ exception.id }} |
| 80 | + {% endfor %} |
| 81 | + {% endif %} |
| 82 | + |
| 83 | + |
| 84 | + {% endif %} |
| 85 | + {% set visible_classes = visible_children|selectattr("type", "equalto", "class")|list %} |
| 86 | + {% if visible_classes %} |
| 87 | + {% if "class" in own_page_types or "show-module-summary" in autoapi_options %} |
| 88 | +Classes |
| 89 | +------- |
| 90 | + |
| 91 | + {% if "class" in own_page_types %} |
| 92 | +.. toctree:: |
| 93 | + :hidden: |
| 94 | + |
| 95 | + {{ macros.auto_summary(visible_classes, title="Classes") }} |
| 96 | + |
| 97 | + {% endif %} |
| 98 | +.. autoapisummary:: |
| 99 | + |
| 100 | + {{ macros.auto_summary(visible_classes, title="Classes") }} |
| 101 | + {% endif %} |
| 102 | + |
| 103 | + |
| 104 | + {% endif %} |
| 105 | + {% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %} |
| 106 | + {% if visible_functions %} |
| 107 | + {% if "function" in own_page_types or "show-module-summary" in autoapi_options %} |
| 108 | +Functions |
| 109 | +--------- |
| 110 | + |
| 111 | + {% if "function" in own_page_types %} |
| 112 | +.. toctree:: |
| 113 | + :hidden: |
| 114 | + |
| 115 | + {% for function in visible_functions %} |
| 116 | + {{ function.include_path }} |
| 117 | + {% endfor %} |
| 118 | + |
| 119 | + {% endif %} |
| 120 | +.. autoapisummary:: |
| 121 | + |
| 122 | + {% for function in visible_functions %} |
| 123 | + {{ function.id }} |
| 124 | + {% endfor %} |
| 125 | + {% endif %} |
| 126 | + |
| 127 | + |
| 128 | + {% endif %} |
| 129 | + {% set this_page_children = visible_children|rejectattr("type", "in", own_page_types)|list %} |
| 130 | + {% if this_page_children %} |
| 131 | +{{ obj.type|title }} Contents |
| 132 | +{{ "-" * obj.type|length }}--------- |
| 133 | + |
| 134 | + {% for obj_item in this_page_children %} |
| 135 | +{{ obj_item.render()|indent(0) }} |
| 136 | + {% endfor %} |
| 137 | + {% endif %} |
| 138 | + {% endif %} |
| 139 | + {% endblock %} |
| 140 | + {% else %} |
| 141 | +.. py:module:: {{ obj.name }} |
| 142 | +
|
| 143 | + {% if obj.docstring %} |
| 144 | + .. autoapi-nested-parse:: |
| 145 | + |
| 146 | + {{ obj.docstring|indent(6) }} |
| 147 | + |
| 148 | + {% endif %} |
| 149 | + {% for obj_item in visible_children %} |
| 150 | + {{ obj_item.render()|indent(3) }} |
| 151 | + {% endfor %} |
| 152 | + {% endif %} |
| 153 | +{% endif %} |
0 commit comments