Method
add_detections
(self, a_detections: List[Detection], b_detections: List[Detection])
Source from the content-addressed store, hash-verified
| 85 | return cls(**data) |
| 86 | |
| 87 | def add_detections(self, a_detections: List[Detection], b_detections: List[Detection]): |
| 88 | duplicates = set(x.diff_hash for x in a_detections) & set(x.diff_hash for x in b_detections) |
| 89 | self.new_detections = [x for x in b_detections if x.diff_hash not in duplicates] |
| 90 | self.removed_detections = [x for x in a_detections if x.diff_hash not in duplicates] |
| 91 | |
| 92 | def as_dict(self) -> dict: |
| 93 | d = { |
Tested by
no test coverage detected