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

Function clamp_weight

agents/master-coordinator/main.py:491–493  ·  view source on GitHub ↗

Clamp profile weights into a safe displayable range.

(value: float, minimum: float = 0.1, maximum: float = 0.95)

Source from the content-addressed store, hash-verified

489
490
491def clamp_weight(value: float, minimum: float = 0.1, maximum: float = 0.95) -> float:
492 """Clamp profile weights into a safe displayable range."""
493 return max(minimum, min(maximum, round(float(value), 2)))
494
495
496def iter_topic_aliases(topic_key: str) -> List[str]:

Callers 2

handle_profile_updateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected