"""Shared environment-variable parsing.""" from __future__ import annotations import os def env_bool(name: str, default: bool) -> bool: raw = os.environ.get(name) if raw is None: return default return raw.strip().lower() in {"1", "true", "yes", "on"}