From 763ea9294b051ed8893030be070250f3ada5e69c Mon Sep 17 00:00:00 2001 From: Plom Heller Date: Sun, 3 May 2026 20:41:30 +0200 Subject: [PATCH] Sort "?" outputs. --- bricksplom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]) -- 2.30.2