Skip to content

autoapi class.rst doesn't render multiple return types #323

@pkrull-ansys

Description

@pkrull-ansys

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

    @property
    def geometry(self) -> StlFile | BuildFile:
        """Part geometry."""
        return self._geometry

renders as
image

📝 Steps to reproduce

Write a class property or method that returns multiple possible types and annotate it using 3.10+ annotation style. Generate documentation using autoapi and ansys-sphinx-theme. Only the last return type is shown in the generated docs.

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

24.1

🐍 Which Python version are you using?

3.9

📦 Installed packages

ansys-api-additive==1.4.1
ansys-api-platform-instancemanagement==1.0.0
ansys-platform-instancemanagement==1.1.2
ansys-templates==1.7.0
arrow==1.3.0
binaryornot==0.4.4
bleach==6.1.0
bokeh==3.3.0
cachetools==5.3.2
certifi==2023.7.22
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.1.1
cookiecutter==2.2.3
coverage==7.3.2
dill==0.3.7
distlib==0.3.7
exceptiongroup==1.1.3
filelock==3.13.1
google-api-core==2.12.0
google-api-python-client==2.106.0
google-auth==2.23.4
google-auth-httplib2==0.1.1
googleapis-common-protos==1.61.0
grpcio==1.59.2
grpcio-health-checking==1.48.2
httplib2==0.22.0
identify==2.5.31
idna==3.4
importlib-metadata==6.8.0
iniconfig==2.0.0
isort==5.12.0
Jinja2==3.1.2
linkify-it-py==2.0.2
Markdown==3.5.1
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdit-py-plugins==0.4.0
mdurl==0.1.2
nodeenv==1.8.0
numpy==1.26.1
packaging==23.2
pandas==2.1.2
panel==1.3.1
param==2.0.0
Pillow==10.1.0
platformdirs==3.11.0
plotly==5.18.0
pluggy==1.3.0
pre-commit==3.5.0
protobuf==3.20.3
pyasn1==0.5.0
pyasn1-modules==0.3.0
pyparsing==3.1.1
pyproject-api==1.6.1
pytest==7.4.3
pytest-cov==4.1.0
python-dateutil==2.8.2
python-slugify==8.0.1
pytz==2023.3.post1
pyviz_comms==3.0.0
PyYAML==6.0.1
requests==2.31.0
rsa==4.9
six==1.16.0
tenacity==8.2.3
text-unidecode==1.3
tomli==2.0.1
tornado==6.3.3
tox==4.11.3
tqdm==4.66.1
types-python-dateutil==2.8.19.14
typing_extensions==4.8.0
tzdata==2023.3
uc-micro-py==1.0.2
uritemplate==4.1.1
urllib3==2.0.7
virtualenv==20.24.6
webencodings==0.5.1
xyzservices==2023.10.1
zipp==3.17.0

Metadata

Metadata

Assignees

Labels

bugDefects or glitches reported by users or developers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions