From: Plom Heller Date: Sun, 3 May 2026 18:41:30 +0000 (+0200) Subject: Sort "?" outputs. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/%7B%7Bprefix%7D%7D/todos?a=commitdiff_plain;h=763ea9294b051ed8893030be070250f3ada5e69c;p=bricksplom Sort "?" outputs. --- diff --git a/bricksplom.py b/bricksplom.py index e3b3ecc..8239f1a 100755 --- a/bricksplom.py +++ b/bricksplom.py @@ -462,7 +462,9 @@ class BricksDb: assert table_name in self.lookupable maybe_dict = getattr(self, table_name) table = maybe_dict if isinstance(maybe_dict, dict) else maybe_dict() - return (CHAR_NEWLINE.join([str(v) for v in table.values() + return (CHAR_NEWLINE.join([str(v) for + v in sorted(table.values(), + key=lambda v: f'{v.id_:>7}') if inquiry[1:].upper() in str(v).upper()]) if inquiry.startswith(CHAR_INQUIRY) else table[inquiry])