In Windows a read-only file cannot be removed, and shutil.rmtree fails. So we implement our own version of rmtree to address this issue.
(path: str | Path)
| 96 | |
| 97 | |
| 98 | def rmtree(path: str | Path) -> None: |
| 99 | """In Windows a read-only file cannot be removed, and shutil.rmtree fails. |
| 100 | So we implement our own version of rmtree to address this issue. |
| 101 | """ |
| 102 | if Path(path).exists(): |
| 103 | shutil.rmtree(path, onerror=force_rm_handle) |
| 104 | |
| 105 | |
| 106 | def diff_safeiter(diff: pygit2.Diff) -> Iterator[pygit2.Patch]: |
nothing calls this directly
no test coverage detected
searching dependent graphs…