File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
theme/ansys_sphinx_theme/_templates/autoapi/python Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1111from ansys_sphinx_theme .extension .linkcode import DOMAIN_KEYS , sphinx_linkcode_resolve
1212from ansys_sphinx_theme .latex import generate_404 # noqa: F401
1313
14- __version__ = "0.11.1 "
14+ __version__ = "0.11.2 "
1515
1616
1717# Declare the fundamental paths of the theme
Original file line number Diff line number Diff line change @@ -79,10 +79,23 @@ Summary
7979{% set visible_interfaces = [] %}
8080{% set visible_enums = [] %}
8181{% for element in visible_classes_and_interfaces %}
82- {% if element.name.startswith("I") and element.name[1].isupper() and ("enum.Enum" not in element.bases) %}
83- {% set _ = visible_interfaces.append(element) %}
84- {% elif "enum.Enum" in element.bases %}
82+
83+ {#
84+ HACK: there is not built-in "startswith" test, no "break" statement, and
85+ no limited scope for variables inside blocks, see:
86+ https://stackoverflow.com/questions/4870346/can-a-jinja-variables-scope-extend-beyond-in-an-inner-block
87+ #}
88+ {% set has_enum_base = [] %}
89+ {% for base in element.bases %}
90+ {% if base.startswith("enum.") %}
91+ {% set _ = has_enum_base.append(true) %}
92+ {% endif %}
93+ {% endfor %}
94+
95+ {% if has_enum_base %}
8596 {% set _ = visible_enums.append(element) %}
97+ {% elif element.name.startswith("I") and element.name[1].isupper() and not has_enum_base %}
98+ {% set _ = visible_interfaces.append(element) %}
8699 {% else %}
87100 {% set _ = visible_classes.append(element) %}
88101 {% endif %}
You can’t perform that action at this time.
0 commit comments