Skip to content

Commit 935548d

Browse files
committed
added descriptions to some parameters
1 parent 8dfbba3 commit 935548d

File tree

2 files changed

+168
-168
lines changed

2 files changed

+168
-168
lines changed

scripts/param_parser.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
i = 0
2020
for line in lines:
2121
# search for init_param lines
22-
match = re.search("^\s*init_param", line)
22+
match = re.search(r"^\s*init_param", line)
2323
if match != None:
24-
name_with_quotes = re.search("\".*\"", line).group(0)
25-
name = re.search("\w{1,16}", name_with_quotes).group(0)
24+
name_with_quotes = re.search(r"\".*\"", line).group(0)
25+
name = re.search(r"\w{1,16}", name_with_quotes).group(0)
2626
if name != 'DEFAULT':
2727
params.append(dict())
28-
params[i]['type'] = re.split("\(", re.split("_", line)[2])[0]
28+
params[i]['type'] = re.split(r"\(", re.split(r"_", line)[2])[0]
2929
params[i]['name'] = name
3030
# Find default value
31-
params[i]['default'] = re.split("\)", re.split(",", line)[2])[0]
31+
params[i]['default'] = re.split(r"\)", re.split(r",", line)[2])[0]
3232
# isolate the comment portion of the line and split it on the "|" characters
33-
comment = re.split("\|", re.split("//", line)[1])
33+
comment = re.split(r"\|", re.split(r"//", line)[1])
3434
# Isolate the Description
3535
params[i]["description"] = comment[0].strip()
3636
params[i]["min"] = comment[1].strip()

0 commit comments

Comments
 (0)