|
19 | 19 | i = 0 |
20 | 20 | for line in lines: |
21 | 21 | # search for init_param lines |
22 | | - match = re.search("^\s*init_param", line) |
| 22 | + match = re.search(r"^\s*init_param", line) |
23 | 23 | 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) |
26 | 26 | if name != 'DEFAULT': |
27 | 27 | 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] |
29 | 29 | params[i]['name'] = name |
30 | 30 | # 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] |
32 | 32 | # 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]) |
34 | 34 | # Isolate the Description |
35 | 35 | params[i]["description"] = comment[0].strip() |
36 | 36 | params[i]["min"] = comment[1].strip() |
|
0 commit comments