home
·
contact
·
privacy
projects
/
bricksplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9054fa5
)
Resolve pylint warnings.
master
author
Plom Heller
<plom@plomlompom.com>
Thu, 30 Apr 2026 01:35:43 +0000
(
03:35
+0200)
committer
Plom Heller
<plom@plomlompom.com>
Thu, 30 Apr 2026 01:35:43 +0000
(
03:35
+0200)
bricksplom.py
patch
|
blob
|
history
diff --git
a/bricksplom.py
b/bricksplom.py
index dafe49104495fbb8613cde7da622878dbde5727b..6a8fc7314684f0d8ea884eef1cf73487f0c21b29 100755
(executable)
--- 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
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():
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:
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))
dir_tables = environ.get(NAME_ENV_DIRNAME, '.')
colors = Color.from_textfile((dir_tables, PATH_COLORS))
pieces = Piece.from_textfile((dir_tables, PATH_PIECES))