Skip to content

Commit bed4a86

Browse files
committed
Check that labels are synced when dumping variants.json
Signed-off-by: Michał Górny <mgorny@quansight.com>
1 parent c4f9486 commit bed4a86

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

variantlib/variants_json.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ def providers_dict(self) -> dict[str, dict[str, str | list[str] | bool]]:
9090
def to_str(self) -> str:
9191
"""Serialize variants.json as a JSON string"""
9292

93+
assert all(label == vdesc.label for label, vdesc in self.variants.items())
94+
9395
data: dict[str, Any] = {
9496
VARIANTS_JSON_SCHEMA_KEY: VARIANTS_JSON_SCHEMA_URL,
9597
VARIANT_INFO_DEFAULT_PRIO_KEY: dict(self._priorities_to_json()),

0 commit comments

Comments
 (0)