(lang: str, dupes: Dict[str, List[Path]])
| 754 | return {k: v for k, v in dupes.items() if len(v) > 1} |
| 755 | |
| 756 | def format_dupes(lang: str, dupes: Dict[str, List[Path]]) -> str: |
| 757 | lines: List[str] = [] |
| 758 | for k, paths in sorted(dupes.items(), key=lambda kv: len(kv[1]), reverse=True): |
| 759 | _, digest, sz = k.split(":", 2) |
| 760 | lines.append(f"\n== {format_size(int(sz))} {digest} ({len(paths)} {t('label_files_word', lang)}) ==") |
| 761 | for p in paths: |
| 762 | lines.append(f" - {p}") |
| 763 | return "\n".join(lines).strip() |
| 764 | |
| 765 | |
| 766 | # ------------------ Trash (safe move) ------------------ |
no test coverage detected