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