Store just highest qc and aggregated views in AggregatedQc,

This commit is contained in:
danielsanchezq 2023-04-03 19:33:02 +02:00
parent 345c37f234
commit 9a65a7b9c5
1 changed files with 4 additions and 2 deletions

View File

@ -22,14 +22,16 @@ class StandardQc:
@dataclass
class AggregateQc:
qcs: List[StandardQc]
qcs: List[View]
highest_qc: StandardQc
view: View
def view(self) -> View:
return self.view
def high_qc(self) -> StandardQc:
return max(self.qcs, key=lambda qc: qc.view)
assert self.highest_qc.view == max(self.qcs)
return self.highest_qc
Qc: TypeAlias = StandardQc | AggregateQc