INNER CODE UNIT · Python

load_allowlist

floci-io/floci · .github/ci/compat-opentofu-drift-check.py:39

def load_allowlist(path):
    if not path.exists():
        return set()
    addrs = set()
    for line in path.read_text().splitlines():
        addr = line.split('#', 1)[0].strip()
        if addr:
            addrs.add(addr)
    return addrs


def check_direction(label, only_in, allowlist_path):
    """Report unexpected and stale entries for one direction. Returns True if clean."""
    allowed = load_allowlist(allowlist_path)
    unexpected = sorted(only_in - allowed)
    stale = sorted(allowed - only_in)
    ok = True
    if unexpected:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…