|
| 1 | +{% if obj.display %} |
| 2 | + {% if is_own_page %} |
| 3 | +{{ obj.id }} |
| 4 | +{{ "=" * obj.id | length }} |
| 5 | + |
| 6 | + {% endif %} |
| 7 | + {% set visible_children = obj.children|selectattr("display")|list %} |
| 8 | + {% set own_page_children = visible_children|selectattr("type", "in", own_page_types)|list %} |
| 9 | + {% if is_own_page and own_page_children %} |
| 10 | +.. toctree:: |
| 11 | + :hidden: |
| 12 | + |
| 13 | + {% for child in own_page_children %} |
| 14 | + {{ child.include_path }} |
| 15 | + {% endfor %} |
| 16 | + |
| 17 | + {% endif %} |
| 18 | +.. py:{{ obj.type }}:: {% if is_own_page %}{{ obj.id }}{% else %}{{ obj.short_name }}{% endif %}{% if obj.args %}({{ obj.args }}){% endif %} |
| 19 | +
|
| 20 | + {% for (args, return_annotation) in obj.overloads %} |
| 21 | + {{ " " * (obj.type | length) }} {{ obj.short_name }}{% if args %}({{ args }}){% endif %} |
| 22 | + |
| 23 | + {% endfor %} |
| 24 | + {% if obj.bases %} |
| 25 | + {% if "show-inheritance" in autoapi_options %} |
| 26 | + |
| 27 | + Bases: {% for base in obj.bases %}{{ base|link_objs }}{% if not loop.last %}, {% endif %}{% endfor %} |
| 28 | + {% endif %} |
| 29 | + |
| 30 | + |
| 31 | + {% if "show-inheritance-diagram" in autoapi_options and obj.bases != ["object"] %} |
| 32 | + .. autoapi-inheritance-diagram:: {{ obj.obj["full_name"] }} |
| 33 | + :parts: 1 |
| 34 | + {% if "private-members" in autoapi_options %} |
| 35 | + :private-bases: |
| 36 | + {% endif %} |
| 37 | + |
| 38 | + {% endif %} |
| 39 | + {% endif %} |
| 40 | + {% if obj.docstring %} |
| 41 | + |
| 42 | + {{ obj.docstring|indent(3) }} |
| 43 | + {% endif %} |
| 44 | + {% for obj_item in visible_children %} |
| 45 | + {% if obj_item.type not in own_page_types %} |
| 46 | + |
| 47 | + {{ obj_item.render()|indent(3) }} |
| 48 | + {% endif %} |
| 49 | + {% endfor %} |
| 50 | + {% if is_own_page and own_page_children %} |
| 51 | + {% set visible_attributes = own_page_children|selectattr("type", "equalto", "attribute")|list %} |
| 52 | + {% if visible_attributes %} |
| 53 | +Attributes |
| 54 | +---------- |
| 55 | + |
| 56 | +.. autoapisummary:: |
| 57 | + |
| 58 | + {% for attribute in visible_attributes %} |
| 59 | + {{ attribute.id }} |
| 60 | + {% endfor %} |
| 61 | + |
| 62 | + |
| 63 | + {% endif %} |
| 64 | + {% set visible_exceptions = own_page_children|selectattr("type", "equalto", "exception")|list %} |
| 65 | + {% if visible_exceptions %} |
| 66 | +Exceptions |
| 67 | +---------- |
| 68 | + |
| 69 | +.. autoapisummary:: |
| 70 | + |
| 71 | + {% for exception in visible_exceptions %} |
| 72 | + {{ exception.id }} |
| 73 | + {% endfor %} |
| 74 | + |
| 75 | + |
| 76 | + {% endif %} |
| 77 | + {% set visible_classes = own_page_children|selectattr("type", "equalto", "class")|list %} |
| 78 | + {% if visible_classes %} |
| 79 | +Classes |
| 80 | +------- |
| 81 | + |
| 82 | +.. autoapisummary:: |
| 83 | + |
| 84 | + {% for klass in visible_classes %} |
| 85 | + {{ klass.id }} |
| 86 | + {% endfor %} |
| 87 | + |
| 88 | + |
| 89 | + {% endif %} |
| 90 | + {% set visible_methods = own_page_children|selectattr("type", "equalto", "method")|list %} |
| 91 | + {% if visible_methods %} |
| 92 | +Methods |
| 93 | +------- |
| 94 | + |
| 95 | +.. autoapisummary:: |
| 96 | + |
| 97 | + {% for method in visible_methods %} |
| 98 | + {{ method.id }} |
| 99 | + {% endfor %} |
| 100 | + |
| 101 | + |
| 102 | + {% endif %} |
| 103 | + {% endif %} |
| 104 | +{% endif %} |
0 commit comments