Hello Sphinx community,
I have gotten a TypeError when I build sphinx with autodoc.
"Union" type hint replaced operator "|" in Python 3.10. And, I add into autodoc_mock_imports for dbus package which has external dependencies.
So, in my case, there is an method`s arguments:
foo_arg: dbus.UInt16 | dbus.Array
The Sphinx make TypeError when I build sphinx with autodoc:
TypeError: unsupported operand type(s) for |: 'UInt16' and 'Array'
How can I resolve this problem?
My environment:
Python: 3.10.6
Sphinx: 5.0.2 (but there is still problem when I upgraded 6.1.3)
conf.py:
extensions = ["sphinx.ext.autodoc"]
autodoc_mock_imports = ["gi", "dbus"]
Let me know what you think or if anything is missing.
Regards,
Junho