(
buckets: Sequence[ExposureBucket],
*,
granularity: ExposureGranularity,
)
| 177 | |
| 178 | |
| 179 | def build_exposures_summary( |
| 180 | buckets: Sequence[ExposureBucket], |
| 181 | *, |
| 182 | granularity: ExposureGranularity, |
| 183 | ) -> ExposuresSummary: |
| 184 | return ExposuresSummary( |
| 185 | excluded_identities=sum( |
| 186 | b.first_exposed_identities for b in buckets if b.quarantined |
| 187 | ), |
| 188 | timeseries=ExposuresTimeseries( |
| 189 | granularity=granularity, |
| 190 | points=_timeseries_points([b for b in buckets if not b.quarantined]), |
| 191 | ), |
| 192 | ) |
| 193 | |
| 194 | |
| 195 | def _timeseries_points( |
no test coverage detected
searching dependent graphs…