Hash a sorted list of file paths into a hex digest.
(file_list: list[str])
| 210 | |
| 211 | |
| 212 | def _hash_file_list(file_list: list[str]) -> str: |
| 213 | """Hash a sorted list of file paths into a hex digest.""" |
| 214 | hasher = hashlib.sha256() |
| 215 | for file_path in file_list: |
| 216 | hasher.update(file_path.encode("utf-8")) |
| 217 | hasher.update(b"\n") |
| 218 | return hasher.hexdigest() |
| 219 | |
| 220 | |
| 221 | def _discover_files_in_dir(source_dir: Path, subdir: str) -> list[str]: |
no test coverage detected