Merge pull request #7235 from tk0miya/7226_refactor

refactor: Sorting index entries
This commit is contained in:
Takeshi KOMIYA 2020-03-01 22:53:56 +09:00 committed by GitHub
commit cd15ab658f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,9 +94,9 @@ class IndexEntries:
return (not main, uri) # show main entries at first
for indexentry in new.values():
indexentry[0] = sorted(indexentry[0], key=keyfunc0)
indexentry[0].sort(key=keyfunc0)
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
# following the letters in ASCII, this is where the chr(127) comes from