Collection of Sphinx extensions similar to (but more flexible than) numpydoc
GNU General Public License v3.0
12
stars
6
forks
source link
AttributeError 'types.UnionType' object has no attribute '__qualname__' for UnionType expressions #65
Closed
tilsche closed 1 year ago
I am running into an error with scanpydoc, sphinx, sphinx_autodoc_typehints:
When having any return type in the Python 3.10 Union Type expressions, I get
AttributeError 'types.UnionType' object has no attribute '__qualname__'
in https://github.com/theislab/scanpydoc/blob/master/scanpydoc/elegant_typehints/formatting.py#L37
Oddly,
UnionType
does in fact not have a__qualname__
, while the oldtyping.Union
does: