File tree Expand file tree Collapse file tree 6 files changed +28
-14
lines changed
src/mkdocstrings_handlers/python/templates/material/_base Expand file tree Collapse file tree 6 files changed +28
-14
lines changed Original file line number Diff line number Diff line change 1+ """Some module showing generics.
2+
3+ Type Aliases:
4+ SomeType: Some type alias.
5+ """
6+
17type SomeType [Z ] = int | list [Z ]
28"""Some type alias.
39
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ Context:
6969 {% endif %}
7070 {% with heading_level = heading_level + extra_level %}
7171 {% for type_alias in type_aliases |order_members (config .members_order , members_list ) %}
72- {% if members_list is not none or (not type_alias .is_imported or type_alias .is_public ) %}
72+ {% if config . filters == "public" or members_list is not none or (not type_alias .is_imported or type_alias .is_public ) %}
7373 {% include type_alias |get_template with context %}
7474 {% endif %}
7575 {% endfor %}
Original file line number Diff line number Diff line change @@ -32,12 +32,14 @@ Context:
3232 {% elif config .show_docstring_classes and section .kind .value == "classes" %}
3333 {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
3434 {% include "docstring/classes" |get_template with context %}
35- {% elif config .show_docstring_type_aliases and section .kind .value == "type_aliases" %}
35+ {% elif config .show_docstring_type_aliases and section .kind .value == "type aliases" %}
36+ {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
3637 {% include "docstring/type_aliases" |get_template with context %}
3738 {% elif config .show_docstring_modules and section .kind .value == "modules" %}
3839 {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
3940 {% include "docstring/modules" |get_template with context %}
4041 {% elif config .show_docstring_type_parameters and section .kind .value == "type parameters" %}
42+ {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
4143 {% include "docstring/type_parameters" |get_template with context %}
4244 {% elif config .show_docstring_parameters and section .kind .value == "parameters" %}
4345 {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
Original file line number Diff line number Diff line change 1414 {% endif %}
1515
1616 {% if config .summary .type_aliases %}
17+ {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
1718 {% include "summary/type_aliases" |get_template with context %}
1819 {% endif %}
1920
Original file line number Diff line number Diff line change 77 -#}
88{% endblock logs %}
99
10- {% with section = obj .type_aliases
11- |filter_objects (
12- filters =config .filters ,
13- members_list =members_list ,
14- inherited_members =config .inherited_members ,
15- keep_no_docstrings =config .show_if_no_docstring ,
16- )
17- |order_members (config .members_order , members_list )
18- |as_type_aliases_section (check_public =not members_list )
19- %}
20- {% if section %}{% include "docstring/type_aliases" |get_template with context %}{% endif %}
21- {% endwith %}
10+ {% if not obj .docstring .parsed | selectattr ("kind.value" , "eq" , "type aliases" ) | list %}
11+ {% with section = obj .type_aliases
12+ |filter_objects (
13+ filters =config .filters ,
14+ members_list =members_list ,
15+ inherited_members =config .inherited_members ,
16+ keep_no_docstrings =config .show_if_no_docstring ,
17+ )
18+ |order_members ("alphabetical" , members_list )
19+ |as_type_aliases_section (check_public =not members_list )
20+ %}
21+ {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
22+ {% if section %}{% include "docstring/type_aliases" |get_template with context %}{% endif %}
23+ {% endwith %}
24+ {% endif %}
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ Context:
6363 This block renders the labels for the type alias.
6464 -#}
6565 {% with labels = type_alias .labels %}
66+ {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
6667 {% include "labels" |get_template with context %}
6768 {% endwith %}
6869 {% endblock labels %}
@@ -108,6 +109,7 @@ Context:
108109 This block renders the docstring for the type alias.
109110 -#}
110111 {% with docstring_sections = type_alias .docstring .parsed %}
112+ {# YORE: Bump 2: Replace `"|get_template` with `.html.jinja"` within line. #}
111113 {% include "docstring" |get_template with context %}
112114 {% endwith %}
113115 {% endblock docstring %}
You can’t perform that action at this time.
0 commit comments