summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorEdward Welbourne <[email protected]>2024-10-16 12:00:30 +0200
committerEdward Welbourne <[email protected]>2024-10-23 20:34:58 +0200
commit98db7a35d2ee56f5da11b4a8e745f2ee6a965077 (patch)
tree3d77dd6a9771b0b3b1affd3b96da514f3a47f077 /util
parent87af2b81e4bfe4ff4c58d7040804d5ceecdf4326 (diff)
Fix check for duplicated Windows time-zone IDs
A missing update of a "last" variable meant the loop inevitably did nothing useful. Include type-annotation for last, while doing this. Thankfully the check still doesn't find any duplications, now that I've fixed it so that actually would, were any present. Pick-to: 6.8 6.5 Change-Id: I672e6570359a3ff102a364d8af98c5c8c0bdc4d9 Reviewed-by: Mate Barany <[email protected]>
Diffstat (limited to 'util')
-rw-r--r--util/locale_database/cldr.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/locale_database/cldr.py b/util/locale_database/cldr.py
index c7237308c00..45db816c5ef 100644
--- a/util/locale_database/cldr.py
+++ b/util/locale_database/cldr.py
@@ -121,11 +121,12 @@ class CldrReader (object):
'They could be removed at the next major version.\n')
# Check for duplicate entries in winIds:
- last = ('', '', '')
+ last: tuple[str, str, str] = ('', '', '')
winDup = {}
for triple in sorted(winIds):
if triple[:2] == last[:2]:
winDup.setdefault(triple[:2], []).append(triple[-1])
+ last = triple
if winDup:
joined = '\n\t'.join(f'{t}, {w}: ", ".join(ids)'
for (w, t), ids in winDup.items())