Method
_load_bitmaps
(topic_dir: zipfile.Path, visinfo: Optional[mdl.VisualizationInfo])
Source from the content-addressed store, hash-verified
| 102 | |
| 103 | @staticmethod |
| 104 | def _load_bitmaps(topic_dir: zipfile.Path, visinfo: Optional[mdl.VisualizationInfo]) -> dict[str, bytes]: |
| 105 | if not visinfo or not (bitmaps := visinfo.bitmaps): |
| 106 | return {} |
| 107 | bitmaps_dict = {} |
| 108 | for bitmap in bitmaps.bitmap: |
| 109 | if not bitmap.reference: |
| 110 | continue |
| 111 | bitmap_path = topic_dir.joinpath(bitmap.reference) |
| 112 | if bitmap_path.exists(): |
| 113 | bitmaps_dict[bitmap.reference] = bitmap_path.read_bytes() |
| 114 | return bitmaps_dict |
| 115 | |
| 116 | def save( |
| 117 | self, |
Tested by
no test coverage detected