Parse the second line of the program for the command line. This should have the form # cwd: For example: # cwd: main/subdir
(line: str)
| 139 | |
| 140 | |
| 141 | def parse_cwd(line: str) -> str | None: |
| 142 | """Parse the second line of the program for the command line. |
| 143 | |
| 144 | This should have the form |
| 145 | |
| 146 | # cwd: <directory> |
| 147 | |
| 148 | For example: |
| 149 | |
| 150 | # cwd: main/subdir |
| 151 | """ |
| 152 | m = re.match("# cwd: (.*)$", line) |
| 153 | return m.group(1) if m else None |
| 154 | |
| 155 | |
| 156 | def normalize_devnull(line: str) -> str: |
no test coverage detected
searching dependent graphs…