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

Function _env_int

deployments/desktop/shared/agents.py:366–371  ·  view source on GitHub ↗
(name: str, default: int, *, min_value: int = 1, max_value: int = 100000)

Source from the content-addressed store, hash-verified

364
365
366def _env_int(name: str, default: int, *, min_value: int = 1, max_value: int = 100000) -> int:
367 try:
368 value = int(str(os.environ.get(name, default)).strip())
369 except (TypeError, ValueError):
370 value = default
371 return max(min_value, min(max_value, value))
372
373
374def _configured_path(env_name: str, default_relative: str) -> str:

Callers 1

Calls 1

getMethod · 0.80

Tested by

no test coverage detected