From f113b379ad3df562baf43d97e98eb6c52e9be656 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Mon, 25 Sep 2023 17:44:45 +0200 Subject: [PATCH] [WIP] Debug (#455) * doc: debug * doc: debug * [doc/python] Set typename to empty string if type is None. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Louis Montaut Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- doc/python/doxygen_xml_parser.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/python/doxygen_xml_parser.py b/doc/python/doxygen_xml_parser.py index 36471c9ab..a0235dace 100755 --- a/doc/python/doxygen_xml_parser.py +++ b/doc/python/doxygen_xml_parser.py @@ -87,16 +87,18 @@ def _templateParamToDict(param): - type = param.find("type") + type_ = param.find("type") declname = param.find("declname") defname = param.find("defname") # FIXME type may contain references in two ways: # - the real param type # - the name of the template argument is recognized as the name of a type... if defname is None and declname is None: - typetext = type.text - for c in type.iter(): - if c == type: + typetext = type_.text + if typetext is None: + typetext = "" + for c in type_.iter(): + if c == type_: continue if c.text is not None: typetext += c.text @@ -111,10 +113,10 @@ def _templateParamToDict(param): assert len(s) == 2 return {"type": s[0].strip(), "name": s[1].strip()} else: - return {"type": type.text, "name": ""} + return {"type": type_.text, "name": ""} else: assert defname.text == declname.text - return {"type": type.text, "name": defname.text} + return {"type": type_.text, "name": defname.text} def makeHeaderGuard(filename):