Skip to content

Commit

Permalink
Missed one merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Nov 3, 2022
1 parent 14d65fb commit fd53a05
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions tools/xml2palette/xml2palette.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,53 +1356,6 @@ def process_compounddef_default(compounddef, language):
continue
return result

<<<<<<< HEAD
=======

# find the list of param names and descriptions in the <detaileddescription> tag
def parse_params(detailed_description: str) -> list:
"""
Parse parameter descirptions found in a detailed_description tag. This assumes
rEST style documentation.
:param detailed_description: str, the content of the description XML node
:returns list of parameter descriptions
"""
result = []
split_str = None

if detailed_description.find("Returns:") >= 0:
split_str = "Returns:"
elif detailed_description.find(":returns") >= 0:
split_str = ":returns"

# not sure how to proceed, abort
if split_str is None:
return result

detailed_description = detailed_description.split(split_str)[0]
param_lines = [p.replace('\n','').strip() for p in detailed_description.split(":param")[1:]]
# param_lines = [line.strip() for line in detailed_description]

for p_line in param_lines:
logger.debug("p_line: %s" + p_line)

try:
index_of_second_colon = p_line.index(':', 0)
except:
# didnt find second colon, skip
continue

param_name = p_line[1:index_of_second_colon].strip()
param_description = p_line[index_of_second_colon+2:].strip()

result.append((param_name, param_description))

return result


>>>>>>> master
# find the named aparam in params, and update the description
def set_param_description(name:str, description:str, p_type: str, params:dict):
"""
Expand Down

0 comments on commit fd53a05

Please sign in to comment.