refactor: Sorting index entries

This commit is contained in:
Takeshi KOMIYA 2020-03-01 22:44:42 +09:00
parent 95b98d97d5
commit 99dd7b3b42

View File

@ -94,9 +94,9 @@ class IndexEntries:
return (not main, uri) # show main entries at first return (not main, uri) # show main entries at first
for indexentry in new.values(): for indexentry in new.values():
indexentry[0] = sorted(indexentry[0], key=keyfunc0) indexentry[0].sort(key=keyfunc0)
for subentry in indexentry[1].values(): for subentry in indexentry[1].values():
subentry[0] = sorted(subentry[0], key=keyfunc0) # type: ignore subentry[0].sort(key=keyfunc0) # type: ignore
# sort the index entries; put all symbols at the front, even those # sort the index entries; put all symbols at the front, even those
# following the letters in ASCII, this is where the chr(127) comes from # following the letters in ASCII, this is where the chr(127) comes from