Clamp profile weights into a safe displayable range.
(value: float, minimum: float = 0.1, maximum: float = 0.95)
| 489 | |
| 490 | |
| 491 | def 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 | |
| 496 | def iter_topic_aliases(topic_key: str) -> List[str]: |
no outgoing calls
no test coverage detected