Skip to content
Snippets Groups Projects
Commit aa8436b8 authored by Christoph Lehmann's avatar Christoph Lehmann
Browse files

[scr/doc] fix python2 issues

parent f21978db
No related branches found
No related tags found
No related merge requests found
......@@ -128,10 +128,10 @@ for (dirpath, _, filenames) in os.walk(docdir):
# TODO this can currently only expand the top level
tagpathparts = tagpath.split(".")
if tagpathparts[0] in tag_path_expansion_table:
tagpathhead = tag_path_expansion_table[tagpathparts[0]]
tagpathparts[0] = tag_path_expansion_table[tagpathparts[0]]
else:
tagpathhead = "NONEXISTENT"
tagpath_expanded = ".".join((tagpathhead, *tagpathparts[1:])).lstrip(".")
tagpathparts[0] = "NONEXISTENT"
tagpath_expanded = ".".join(tagpathparts).lstrip(".")
if tagpath:
fh.write("\n\n# Additional info\n")
......
......@@ -113,8 +113,10 @@ if undocumented:
print("| File | Line | Parameter | Type | Method | Link |")
print("| ---- | ---: | --------- | ---- | ------ | ---- |")
for u in sorted(undocumented):
u2 = list(u)
u2.append(github_src_url)
print(("| {0} | {1} | {3} | <tt>{4}</tt> | <tt>{5}</tt> "
+ "| [&rarr; ufz/ogs/master]({6}/{0}#L{1})").format(*u, github_src_url))
+ "| [&rarr; ufz/ogs/master]({6}/{0}#L{1})").format(*u2))
if unneeded_comments:
print()
......@@ -123,9 +125,10 @@ if unneeded_comments:
print("| ---- | ---: | ------- | ---- |")
for u in sorted(unneeded_comments):
u2 = list(u)
u2.append(github_src_url)
u2[2] = re.sub(r'([\\@&$#<>%".|])', r"\\\1", u2[2])
print(("| {0} | {1} | {2} "
+ "| [&rarr; ufz/ogs/master]({3}/{0}#L{1}) |").format(*u2, github_src_url))
+ "| [&rarr; ufz/ogs/master]({3}/{0}#L{1}) |").format(*u2))
if wrong_input:
print()
......@@ -134,9 +137,10 @@ if wrong_input:
print("| ---- | ---: | ------- | ---- |")
for w in sorted(wrong_input):
w2 = list(w)
w2.append(github_src_url)
w2[2] = re.sub(r'([\\@&$#<>%".|])', r"\\\1", w2[2])
print(("| {0} | {1} | {2} "
+ "| [&rarr; ufz/ogs/master]({3}/{0}#L{1}) |").format(*w2, github_src_url))
+ "| [&rarr; ufz/ogs/master]({3}/{0}#L{1}) |").format(*w2))
if no_doc_page:
print()
......@@ -144,8 +148,10 @@ if no_doc_page:
print("| Parameter | File | Line | Link |")
print("| --------- | ---- | ---: | ---- |")
for n in sorted(no_doc_page):
n2 = list(n)
n2.append(github_src_url)
print(("| {0} | {1} | {2} "
+ "| [&rarr; ufz/ogs/master]({3}/{1}#L{2}) |").format(*n, github_src_url))
+ "| [&rarr; ufz/ogs/master]({3}/{1}#L{2}) |").format(*n2))
if unneeded_md_files:
print()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment