Commit 13e52491 authored by Honnip's avatar Honnip Committed by Jan Tojnar
Browse files

gnomeExtensions/update: Sort colliding UUIDs

Unlike `dict`, whose items are guaranteed to follow the insertion order since Python 3.7:
https://docs.python.org/3.13/library/stdtypes.html#mapping-types-dict
Set has no such guarantees:
https://docs.python.org/3.13/library/stdtypes.html#set-types-set-frozenset

Let’s sort the UUIDs to ensure consistent order.
parent 6e9a04a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ def find_collisions(
            if shell_version in extension["shell_version_map"]:
                package_name_registry.setdefault(pname, set()).add(uuid)
    return {
        pname: list(uuids)
        pname: sorted(uuids)
        for pname, uuids in package_name_registry.items()
        if len(uuids) > 1
    }