INNER CODE UNIT · Python

catalog_at

joreilly/Confetti · .github/scripts/ios-changes.py:64

def catalog_at(revision: str) -> dict[str, Any]:
    return tomllib.loads(git("show", f"{revision}:{CATALOG_PATH}").decode())


def changed_catalog_entries(base: dict[str, Any], head: dict[str, Any]) -> set[tuple[str, str]]:
    changed: set[tuple[str, str]] = set()
    for section in ("versions", "libraries", "bundles", "plugins"):
        before = base.get(section, {})
        after = head.get(section, {})
        for key in before.keys() | after.keys():
            if before.get(key) != after.get(key):
                changed.add((section, key))
    return changed


def version_ref(entry: Any) -> str | None:
    if not isinstance(entry, dict):
        return None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…