(original_contents: dict[Path, bytes])
| 53 | |
| 54 | |
| 55 | def restore_original_files(original_contents: dict[Path, bytes]) -> list[str]: |
| 56 | restore_errors: list[str] = [] |
| 57 | |
| 58 | for path, contents in original_contents.items(): |
| 59 | try: |
| 60 | write_bytes(path, contents) |
| 61 | except Exception as exc: |
| 62 | restore_errors.append( |
| 63 | f"FAILED: Could not restore {display_path(path)} after artifact check: {exc}" |
| 64 | ) |
| 65 | |
| 66 | return restore_errors |
| 67 | |
| 68 | |
| 69 | def main() -> int: |
no test coverage detected