Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 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 <louismontaut@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 25, 2023
1 parent 88f376c commit f113b37
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions doc/python/doxygen_xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit f113b37

Please sign in to comment.