From: Plom Heller Date: Thu, 30 Apr 2026 01:35:43 +0000 (+0200) Subject: Resolve pylint warnings. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/blog?a=commitdiff_plain;h=HEAD;p=bricksplom Resolve pylint warnings. --- 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))