Debian Codegraph @

docs/templates/python/material/attributes_table.html.jinja

raw
1 {% if obj.members %}
2 {{ log.debug("Rendering children of " + obj.path) }}
3
4 <div class="doc doc-children">
5 {# Notice inherited members false #}
6 {% with attributes = obj.attributes|filter_objects(
7 filters=config.filters,
8 members_list=members_list,
9 inherited_members=false,
10 keep_no_docstrings=config.show_if_no_docstring,
11 ) %}
12 <table>
13 <thead>
14 <tr>
15 <th>Name</th>
16 <th>Type</th>
17 <th>Description</th>
18 <th>Default</th>
19 </tr>
20 </thead>
21 <tbody>
22 {% for attribute in attributes %}
23 <tr>
24 <td><code>{{ attribute.name }}</code></td>
25 <td>
26 {% if attribute.annotation %}
27 {% with expression = attribute.annotation %}
28 <code>{% include "expression.html.jinja" with context %}</code>
29 {% endwith %}
30 {% endif %}
31 </td>
32 <td>
33 <div class="doc-md-description">
34 {{ attribute.docstring.value }}
35 </div>
36 </td>
37 <td>
38 {% if attribute.value %}
39 {% with expression = attribute.value %}
40 <code>{% include "expression.html.jinja" with context %}</code>
41 {% endwith %}
42 {% else %}
43 <em>-</em>
44 {% endif %}
45 </td>
46 </tr>
47 {% endfor %}
48 </tbody>
49 </table>
50 {%endwith %}
51 {% with classes = obj.classes|filter_objects(
52 filters=config.filters,
53 members_list=members_list,
54 inherited_members=false,
55 keep_no_docstrings=config.show_if_no_docstring,
56 ) %}
57 {% for class in classes %}
58 {% filter heading(heading_level, id=html_id ~ "-attributes") %}{{class.name}}{% endfilter %}
59 <div class="doc doc-children doc-contents">
60 {% set root = False %}
61 {% set heading_level = heading_level + 1 %}
62 {% set old_obj = obj %}
63 {% set obj = class %}
64 {% include "attributes_table.html.jinja" with context %}
65 {% set obj = old_obj %}
66 </div>
67 {% endfor %}
68 {%endwith %}
69 </div>
70 {% endif %}