Source code for cheesecake_kwalitee_index.kwalitee.models
"""
All the data structures that are needed when generating a "kwalitee" score.
"""
[docs]class Score:
"""
A generic score.
"""
def __init__(self, value, total):
self.value = value
self.total = total
def __repr__(self):
return '<{}: {}/{}>'.format(
self.__class__.__name__,
self.value,
self.total)
def __eq__(self, other):
return self.value == other.value and self.total == other.total