From d40572d0a2b7c06aee8561753f36c3fd3a2e1312 Mon Sep 17 00:00:00 2001 From: Plom Heller Date: Thu, 30 Apr 2026 03:35:43 +0200 Subject: [PATCH] Resolve pylint warnings. --- bricksplom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bricksplom.py b/bricksplom.py index dafe491..6a8fc73 100755 --- a/bricksplom.py +++ b/bricksplom.py @@ -426,15 +426,16 @@ def check_consistencies_between_tables( for coll in collections.values(): if coll.is_in is None: continue - direction = 1 if coll.is_in else (-1) for count, piece_id, _ in coll.piece_listings_flat(): - counts[piece_id] = counts.get(piece_id, 0) + (direction * count) + counts[piece_id] = (counts.get(piece_id, 0) + + ((1 if coll.is_in else (-1)) * count)) for piece_id, count in counts.items(): assert count == 0, (piece_id, count) def main( ) -> None: + 'Load tables from BRICKSPLOM_DIR and put out in reproducible listings.' dir_tables = environ.get(NAME_ENV_DIRNAME, '.') colors = Color.from_textfile((dir_tables, PATH_COLORS)) pieces = Piece.from_textfile((dir_tables, PATH_PIECES)) -- 2.30.2