(schema: str)
| 17 | |
| 18 | |
| 19 | def parse_model_fields(schema: str) -> Schema: |
| 20 | def fields(body: str) -> Mapping[str, str]: |
| 21 | parts: Final = tuple(line.split() for line in body.splitlines()) |
| 22 | return MappingProxyType({part[0]: " ".join(part[1:]) for part in parts if len(part) >= 2}) |
| 23 | |
| 24 | return MappingProxyType({match[1]: fields(match[2]) for match in MODELS.finditer(schema)}) |
| 25 | |
| 26 | |
| 27 | def _field_changes(model: str, field: str, old_type: str, new_fields: Mapping[str, str]) -> Iterator[str]: |