From ba6113994c7fdfeeaf186c699226455e36e6ce74 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Mon, 25 Sep 2023 14:22:22 +0200 Subject: [PATCH 1/4] doc: debug --- doc/python/doxygen_xml_parser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/python/doxygen_xml_parser.py b/doc/python/doxygen_xml_parser.py index 36471c9ab..05e3a9b1f 100755 --- a/doc/python/doxygen_xml_parser.py +++ b/doc/python/doxygen_xml_parser.py @@ -95,6 +95,10 @@ def _templateParamToDict(param): # - 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 + if typetext is None: + print("type: ", type) + print("declname: ", declname) + print("defname: ", defname) for c in type.iter(): if c == type: continue From d199cd0de6ce91f2ae8123bf5a76de2e50670dc5 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Mon, 25 Sep 2023 14:34:28 +0200 Subject: [PATCH 2/4] doc: debug --- doc/python/doxygen_xml_parser.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/python/doxygen_xml_parser.py b/doc/python/doxygen_xml_parser.py index 05e3a9b1f..378277e4c 100755 --- a/doc/python/doxygen_xml_parser.py +++ b/doc/python/doxygen_xml_parser.py @@ -87,20 +87,21 @@ 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 + typetext = type_.text + print("type(typetext): ", type(typetext)) if typetext is None: - print("type: ", type) + print("type_: ", type_) print("declname: ", declname) print("defname: ", defname) - for c in type.iter(): - if c == type: + for c in type_.iter(): + if c == type_: continue if c.text is not None: typetext += c.text @@ -115,10 +116,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): From 597112125252f576abf3c4e62af9832e8c9db52c Mon Sep 17 00:00:00 2001 From: Louis Montaut Date: Mon, 25 Sep 2023 15:57:23 +0200 Subject: [PATCH 3/4] [doc/python] Set typename to empty string if type is None. --- doc/python/doxygen_xml_parser.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/python/doxygen_xml_parser.py b/doc/python/doxygen_xml_parser.py index 378277e4c..137f26fe0 100755 --- a/doc/python/doxygen_xml_parser.py +++ b/doc/python/doxygen_xml_parser.py @@ -95,11 +95,8 @@ def _templateParamToDict(param): # - 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 - print("type(typetext): ", type(typetext)) if typetext is None: - print("type_: ", type_) - print("declname: ", declname) - print("defname: ", defname) + typetext = "" for c in type_.iter(): if c == type_: continue From d840e414dae893db65fbb3b0471ef8f6bc6e68c0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 14:00:23 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/python/doxygen_xml_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/doxygen_xml_parser.py b/doc/python/doxygen_xml_parser.py index 137f26fe0..a0235dace 100755 --- a/doc/python/doxygen_xml_parser.py +++ b/doc/python/doxygen_xml_parser.py @@ -96,7 +96,7 @@ def _templateParamToDict(param): if defname is None and declname is None: typetext = type_.text if typetext is None: - typetext = "" + typetext = "" for c in type_.iter(): if c == type_: continue