|
3 | 3 |
|
4 | 4 | <div class="doc doc-children"> |
5 | 5 |
|
| 6 | + {% if root_members %} |
| 7 | + {% set members_list = config.members %} |
| 8 | + {% else %} |
| 9 | + {% set members_list = none %} |
| 10 | + {% endif %} |
| 11 | + |
6 | 12 | {% if config.group_by_category %} |
7 | 13 |
|
8 | 14 | {% with %} |
|
13 | 19 | {% set extra_level = 0 %} |
14 | 20 | {% endif %} |
15 | 21 |
|
16 | | - {% if config.show_category_heading and obj.attributes|filter_docstrings(config.show_if_no_docstring) %} |
17 | | - {% filter heading(heading_level, id=html_id ~ "-attributes") %}Attributes{% endfilter %} |
18 | | - {% endif %} |
19 | | - {% with heading_level = heading_level + extra_level %} |
20 | | - {% for attribute in obj.attributes.values()|order_members(config.members_order) %} |
21 | | - {% if not attribute.is_alias or attribute.is_explicitely_exported %} |
22 | | - {% include "attribute.html" with context %} |
| 22 | + {% with attributes = obj.attributes|filter_objects(config.filters, members_list, config.show_if_no_docstring) %} |
| 23 | + {% if attributes %} |
| 24 | + {% if config.show_category_heading %} |
| 25 | + {% filter heading(heading_level, id=html_id ~ "-attributes") %}Attributes{% endfilter %} |
23 | 26 | {% endif %} |
24 | | - {% endfor %} |
| 27 | + {% with heading_level = heading_level + extra_level %} |
| 28 | + {% for attribute in attributes|order_members(config.members_order, members_list) %} |
| 29 | + {% if not attribute.is_alias or attribute.is_explicitely_exported %} |
| 30 | + {% include "attribute.html" with context %} |
| 31 | + {% endif %} |
| 32 | + {% endfor %} |
| 33 | + {% endwith %} |
| 34 | + {% endif %} |
25 | 35 | {% endwith %} |
26 | 36 |
|
27 | | - {% if config.show_category_heading and obj.classes|filter_docstrings(config.show_if_no_docstring) %} |
28 | | - {% filter heading(heading_level, id=html_id ~ "-classes") %}Classes{% endfilter %} |
29 | | - {% endif %} |
30 | | - {% with heading_level = heading_level + extra_level %} |
31 | | - {% for class in obj.classes.values()|order_members(config.members_order) %} |
32 | | - {% if not class.is_alias or class.is_explicitely_exported %} |
33 | | - {% include "class.html" with context %} |
| 37 | + {% with classes = obj.classes|filter_objects(config.filters, members_list, config.show_if_no_docstring) %} |
| 38 | + {% if classes %} |
| 39 | + {% if config.show_category_heading %} |
| 40 | + {% filter heading(heading_level, id=html_id ~ "-classes") %}Classes{% endfilter %} |
34 | 41 | {% endif %} |
35 | | - {% endfor %} |
| 42 | + {% with heading_level = heading_level + extra_level %} |
| 43 | + {% for class in classes|order_members(config.members_order, members_list) %} |
| 44 | + {% if not class.is_alias or class.is_explicitely_exported %} |
| 45 | + {% include "class.html" with context %} |
| 46 | + {% endif %} |
| 47 | + {% endfor %} |
| 48 | + {% endwith %} |
| 49 | + {% endif %} |
36 | 50 | {% endwith %} |
37 | 51 |
|
38 | | - {% if config.show_category_heading and obj.functions|filter_docstrings(config.show_if_no_docstring) %} |
39 | | - {% filter heading(heading_level, id=html_id ~ "-functions") %}Functions{% endfilter %} |
40 | | - {% endif %} |
41 | | - {% with heading_level = heading_level + extra_level %} |
42 | | - {% for function in obj.functions.values()|order_members(config.members_order) %} |
43 | | - {% if not (obj.kind.value == "class" and function.name == "__init__" and config.merge_init_into_class) %} |
44 | | - {% if not function.is_alias or function.is_explicitely_exported %} |
45 | | - {% include "function.html" with context %} |
46 | | - {% endif %} |
| 52 | + {% with functions = obj.functions|filter_objects(config.filters, members_list, config.show_if_no_docstring) %} |
| 53 | + {% if functions %} |
| 54 | + {% if config.show_category_heading %} |
| 55 | + {% filter heading(heading_level, id=html_id ~ "-functions") %}Functions{% endfilter %} |
47 | 56 | {% endif %} |
48 | | - {% endfor %} |
| 57 | + {% with heading_level = heading_level + extra_level %} |
| 58 | + {% for function in functions|order_members(config.members_order, members_list) %} |
| 59 | + {% if not (obj.kind.value == "class" and function.name == "__init__" and config.merge_init_into_class) %} |
| 60 | + {% if not function.is_alias or function.is_explicitely_exported %} |
| 61 | + {% include "function.html" with context %} |
| 62 | + {% endif %} |
| 63 | + {% endif %} |
| 64 | + {% endfor %} |
| 65 | + {% endwith %} |
| 66 | + {% endif %} |
49 | 67 | {% endwith %} |
50 | 68 |
|
51 | 69 | {% if config.show_submodules %} |
52 | | - {% if config.show_category_heading and obj.modules|filter_docstrings(config.show_if_no_docstring) %} |
53 | | - {% filter heading(heading_level, id=html_id ~ "-modules") %}Modules{% endfilter %} |
54 | | - {% endif %} |
55 | | - {% with heading_level = heading_level + extra_level %} |
56 | | - {% for module in obj.modules.values()|order_members(config.members_order) %} |
57 | | - {% if not module.is_alias or module.is_explicitely_exported %} |
58 | | - {% include "module.html" with context %} |
| 70 | + {% with modules = obj.modules|filter_objects(config.filters, members_list, config.show_if_no_docstring) %} |
| 71 | + {% if modules %} |
| 72 | + {% if config.show_category_heading %} |
| 73 | + {% filter heading(heading_level, id=html_id ~ "-modules") %}Modules{% endfilter %} |
59 | 74 | {% endif %} |
60 | | - {% endfor %} |
| 75 | + {% with heading_level = heading_level + extra_level %} |
| 76 | + {% for module in modules|order_members(config.members_order, members_list) %} |
| 77 | + {% if not module.is_alias or module.is_explicitely_exported %} |
| 78 | + {% include "module.html" with context %} |
| 79 | + {% endif %} |
| 80 | + {% endfor %} |
| 81 | + {% endwith %} |
| 82 | + {% endif %} |
61 | 83 | {% endwith %} |
62 | 84 | {% endif %} |
63 | 85 |
|
64 | 86 | {% endwith %} |
65 | 87 |
|
66 | 88 | {% else %} |
67 | 89 |
|
68 | | - {% for child in obj.members.values()|order_members(config.members_order) %} |
| 90 | + {% for child in obj.members| |
| 91 | + filter_objects(config.filters, members_list, config.show_if_no_docstring)| |
| 92 | + order_members(config.members_order, members_list) %} |
69 | 93 |
|
70 | 94 | {% if not (obj.kind.value == "class" and child.name == "__init__" and config.merge_init_into_class) %} |
71 | 95 |
|
|
0 commit comments