ethux's picture
2026-10 update
6fb01b2 verified
Raw History Blame Contribute Delete
437 Bytes
def check_counts(previous: dict[str, int] | None, current: dict[str, int], max_drop: float = 0.10) -> list[str]:
"""Configs whose row count dropped more than max_drop. Configs absent on either side are skipped."""
if not previous:
return []
return [
f"{cfg}: {prev} -> {current[cfg]}"
for cfg, prev in previous.items()
if cfg in current and prev and current[cfg] < prev * (1 - max_drop)
]