(path: Path)
| 58 | |
| 59 | def fingerprint_cache_inputs(image_id: str | None = None) -> str: |
| 60 | def iter_files(path: Path) -> Iterator[Path]: |
| 61 | if path.is_dir(): |
| 62 | for root, dirs, files in os.walk(path): |
| 63 | for f in files: |
| 64 | yield Path(root) / f |
| 65 | else: |
| 66 | yield path |
| 67 | |
| 68 | hashes = { |
| 69 | str(path): hashlib.sha256(path.read_bytes()).hexdigest() |
no test coverage detected