One file-level operation inside a patch.
| 71 | |
| 72 | @dataclass |
| 73 | class PatchHunk: |
| 74 | """One file-level operation inside a patch.""" |
| 75 | type: str # "add" | "update" | "delete" |
| 76 | path: str |
| 77 | contents: str = "" # type="add": new file body |
| 78 | move_path: Optional[str] = None # type="update": optional rename target |
| 79 | chunks: List[UpdateChunk] = field(default_factory=list) |
| 80 | |
| 81 | |
| 82 | @dataclass |