Fix _pseudo_parse_arglist from Sphinx

sphinx.domain.python got split[0] into multiple modules so make the
sphinx extension work with older and newer Sphinx versions.

[0]
e9dcfebcf9

Change-Id: I2dfb085cd382e277562f4dcb3d903729dc388fd4
This commit is contained in:
Thomas Bechtold 2024-05-06 17:28:08 +02:00
parent 137586d548
commit 770a4bbb4a

View File

@ -22,7 +22,11 @@
import re
from sphinx import addnodes
from sphinx.domains.python import _pseudo_parse_arglist
try:
from sphinx.domains.python._annotations import _pseudo_parse_arglist
except ImportError:
from sphinx.domains.python import _pseudo_parse_arglist
from sphinx.domains.python import PyFunction, PyXRefRole
from sphinx.ext.autodoc import Documenter
from sphinx.ext.autodoc import FunctionDocumenter