Skip to content

Commit 5f64fcd

Browse files
jorgepilotoRevathyvenugopal162
authored andcommitted
ver: bump version 0.11.2
1 parent 86f4029 commit 5f64fcd

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/ansys_sphinx_theme/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from ansys_sphinx_theme.extension.linkcode import DOMAIN_KEYS, sphinx_linkcode_resolve
1212
from 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

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/_templates/autoapi/python/module.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff 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 %}

0 commit comments

Comments
 (0)