digitalfabrik/integreat-cms

View on GitHub
integreat_cms/cms/utils/round_hix_score.py

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
def round_hix_score(raw_score: float | None) -> float | None:
    """
    Function to round HIX score
    """

    if raw_score is None:
        return None
    return round(raw_score, ndigits=2)