Merge remote-tracking branch 'origin/main'

This commit is contained in:
Hosted Weblate 2022-06-03 23:58:05 +02:00
commit 885206580b
No known key found for this signature in database
GPG Key ID: A3FAAA06E6569B4C

View File

@ -400,7 +400,8 @@ def compute_huffman_coding(translations, compression_filename):
# words[] array.
scores = sorted(
((s, -est_net_savings(s, occ)) for (s, occ) in counter.items()), key=lambda x: x[1]
((s, -est_net_savings(s, occ)) for (s, occ) in counter.items() if occ > 1),
key=lambda x: x[1],
)
# Pick the one with the highest score. The score must be negative.