(name: str, default: bool = False)
| 170 | |
| 171 | |
| 172 | def _env_flag(name: str, default: bool = False) -> bool: |
| 173 | raw = os.environ.get(name) |
| 174 | if raw is None: |
| 175 | return default |
| 176 | return raw.strip().lower() not in {"0", "false", "off", "no", ""} |
| 177 | |
| 178 | |
| 179 | def _env_int(name: str, default: int, *, minimum: int = 1, maximum: int = 16) -> int: |
no test coverage detected