(self, line: str)
| 61 | return match.groups()[0] |
| 62 | |
| 63 | def _parse_section_header(self, line: str) -> Section: |
| 64 | match = re.fullmatch(r"\[(\w+):(\w+)\]", line) |
| 65 | if not match: |
| 66 | raise ValueError("Invalid section header") |
| 67 | section_name, section_type = match.groups() |
| 68 | return Section(section_name, section_type) |
| 69 | |
| 70 | def _parse_property(self, line: str) -> (str, object): |
| 71 | property_name, property_value = re.split(r"\s*=\s*", line, maxsplit=1) |