You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
autodoc_type_aliases shows weird behavior when a function contains union of aliased type and other type.
How to Reproduce
minimum.py
from __future__ importannotationsclassAlias:
alias=intdeffunc(
arg1: Alias.alias,
arg2: Alias.alias,
) ->Alias.alias:
"""expected behavior. `Alias.alias` is replaced to `alias`. """return1deffunc_buggy(
arg1: Alias.alias,
arg2: Alias.alias|str,
) ->Alias.alias:
"""types, including return type and type of arg1, are not replaced to alias """return1
Describe the bug
autodoc_type_aliases shows weird behavior when a function contains union of aliased type and other type.
How to Reproduce
minimum.py
conf.py
index.rst
detail.rst
Environment Information
Sphinx extensions
["sphinx.ext.autodoc"]
Additional context
generated html
The text was updated successfully, but these errors were encountered: