Skip to content

Commit e67107c

Browse files
committed
Improve duplicate removal: use text length before lexicographical order
1 parent 37325f7 commit e67107c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/trim_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def trim_sandbox_ids_dict(sandbox_ids_dict):
2323
trimmed_dict = dict()
2424

2525
# NB: the sort aims to **try** to make the base edition of the game appear first. This is useful, yet not foolproof!
26-
for slug, sandbox_id in sorted(sandbox_ids_dict.items(), key=lambda x: x[0]):
26+
for slug, sandbox_id in sorted(sandbox_ids_dict.items(), key=lambda x: (len(x[0]), x[0])):
2727
# NB: the check for positive length is to tackle the edge case where store data is not on the disk.
2828
if slug not in slugs_for_base_games and len(slugs_for_base_games) > 0:
2929
continue

0 commit comments

Comments
 (0)