MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / format_sizes_report

Function format_sizes_report

Scripts/Developer Base/Tree Explorer.py:865–871  ·  view source on GitHub ↗
(items: List[Tuple[int, Path]])

Source from the content-addressed store, hash-verified

863 return items[: max(0, top_n)]
864
865def format_sizes_report(items: List[Tuple[int, Path]]) -> str:
866 total = sum(sz for sz, _ in items) or 1
867 lines: List[str] = []
868 for i, (sz, p) in enumerate(items, start=1):
869 pct = (sz * 100.0) / total
870 lines.append(f"{i:>2}. {format_size(sz):>10} {pct:>6.2f}% {p}")
871 return "\n".join(lines) if lines else ""
872
873
874# ------------------ Recent files (mtime) ------------------

Callers 2

run_sizes_reportFunction · 0.70
mainFunction · 0.70

Calls 1

format_sizeFunction · 0.70

Tested by

no test coverage detected