"platforms/cuda/vscode:/vscode.git/clone" did not exist on "fe144750fed66200a5a23a8542da4069db6de5eb"
Commit c8443904 authored by Robert McGibbon's avatar Robert McGibbon
Browse files

Fix some code review issues

parent 7696ce12
...@@ -38,15 +38,15 @@ while True: ...@@ -38,15 +38,15 @@ while True:
stripped = line.lstrip() stripped = line.lstrip()
if stripped.startswith('"""') or stripped.startswith("'''"): if stripped.startswith('"""') or stripped.startswith("'''"):
line = stripped[3:] line = stripped[3:]
readingParameters = False
if line.find('"""') != -1 or line.find("'''") != -1:
docstringlines.append(line.rstrip()[:-3])
else:
while line.find('"""') == -1 and line.find("'''") == -1: while line.find('"""') == -1 and line.find("'''") == -1:
docstringlines.append(line) docstringlines.append(line)
line = input.readline() line = input.readline().rstrip()
if line.endswith('"""') or line.endswith("'''"):
docstringlines.append(line[:-3])
docstring = NumpyDocString(cleandoc(''.join(docstringlines))) docstring = NumpyDocString(cleandoc('\n'.join(docstringlines)))
# Print out the docstring in Doxygen syntax, followed by the declaration. # Print out the docstring in Doxygen syntax, followed by the declaration.
for line in docstring['Summary']: for line in docstring['Summary']:
...@@ -57,7 +57,7 @@ while True: ...@@ -57,7 +57,7 @@ while True:
print('{prefix}## {line}'.format(prefix=prefix, line=line.strip())) print('{prefix}## {line}'.format(prefix=prefix, line=line.strip()))
print('{prefix}##'.format(prefix=prefix)) print('{prefix}##'.format(prefix=prefix))
for name, type, descr in docstring['Parameters']: for name, type, descr in docstring['Parameters']:
print('{prefix}## @param {name} ({type}) {descr}'.format(prefix=prefix, type=type, name=name, descr=''.join(descr))) print('{prefix}## @param {name} ({type}) {descr}'.format(prefix=prefix, type=type, name=name, descr=' '.join(descr)))
for name, type, descr in docstring['Returns']: for name, type, descr in docstring['Returns']:
if type == '': if type == '':
type = name type = name
......
...@@ -49,8 +49,7 @@ def striphtmltags(s): ...@@ -49,8 +49,7 @@ def striphtmltags(s):
s = s.replace('<i>', '_').replace('</i>', '_') s = s.replace('<i>', '_').replace('</i>', '_')
s = s.replace('<b>', '*').replace('</b>', '*') s = s.replace('<b>', '*').replace('</b>', '*')
s = re.sub('\s*(<ul>.*</ul>\s*)', replace_ul_tags, s, flags=re.MULTILINE | re.DOTALL) s = re.sub('\s*(<ul>.*?</ul>\s*)', replace_ul_tags, s, flags=re.MULTILINE | re.DOTALL)
return s return s
def trimToSingleSpace(text): def trimToSingleSpace(text):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment