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