Skip to content

_normalize_severity

Internal helper
This page documents an internal implementation helper, not a primary public API.
Source code in src/fabricops_kit/quality.py
 97
 98
 99
100
101
def _normalize_severity(rule: dict[str, Any]) -> tuple[str, str | None]:
    severity = str(rule.get("severity", "critical")).lower()
    if severity not in SEVERITY_TO_ACTION:
        return "critical", "Invalid severity; defaulted to critical"
    return severity, None