MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / env_flag

Function env_flag

paperflow/roles.py:22–26  ·  view source on GitHub ↗
(name: str, default: bool = False)

Source from the content-addressed store, hash-verified

20
21
22def env_flag(name: str, default: bool = False) -> bool:
23 raw = os.environ.get(name)
24 if raw is None:
25 return default
26 return raw.strip().lower() not in {"0", "false", "off", "no", ""}
27
28
29def roles_path(*, project_root: Optional[Path] = None) -> Path:

Callers 2

Calls 1

getMethod · 0.80

Tested by

no test coverage detected