(header: str)
| 193 | |
| 194 | @staticmethod |
| 195 | def from_string(header: str) -> "PatchHeader": |
| 196 | # First item returned by split() contains commit info and message, skip it |
| 197 | info, *lines = _RX_HEADER_FILE_LINE_SEPARATOR.split(header) |
| 198 | return PatchHeader( |
| 199 | info, |
| 200 | [PatchFileInfo.from_string(x) for x in lines], |
| 201 | ) |
| 202 | |
| 203 | |
| 204 | def parse_patch( |