From: Plom Heller Date: Mon, 4 May 2026 04:29:14 +0000 (+0200) Subject: Reduce hardcoding of "box:" prefix. X-Git-Url: https://plomlompom.com/repos/booking/%22https:/validator.w3.org/static/condition_descriptions?a=commitdiff_plain;p=bricksplom Reduce hardcoding of "box:" prefix. --- diff --git a/bricksplom.py b/bricksplom.py index c085448..c0ea7e1 100755 --- a/bricksplom.py +++ b/bricksplom.py @@ -419,7 +419,7 @@ class Box(WithDb, Lookupable): ) -> str: 'Call .raw() of base Collection.' assert self._db - return self._db.collections[f'box:{self.id_}'].raw() + return self._db.collections[f'{BOX_PREFIX}{self.id_}'].raw() class BricksDb: @@ -441,7 +441,7 @@ class BricksDb: def boxes( self ) -> dict[str, Box]: - 'Parsed from "box:"-prefixed entries in .collections.' + 'Parsed from BOX_PREFIX-prefixed entries in .collections.' collected = {} for coll in [c for c in self.collections.values() if c.id_.startswith(BOX_PREFIX)]: