Simplify sorting
Calling sort_key explicitly is marginally faster, but less readable. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
28af958ea4
commit
7fa3eb7d44
1 changed files with 1 additions and 1 deletions
|
@ -400,7 +400,7 @@ def list_files_to_merge(options):
|
||||||
"Oldest" is defined by `EntryFileSortKey`.
|
"Oldest" is defined by `EntryFileSortKey`.
|
||||||
"""
|
"""
|
||||||
files_to_merge = glob.glob(os.path.join(options.dir, '*.md'))
|
files_to_merge = glob.glob(os.path.join(options.dir, '*.md'))
|
||||||
files_to_merge.sort(key=lambda f: EntryFileSortKey(f).sort_key())
|
files_to_merge.sort(key=EntryFileSortKey)
|
||||||
return files_to_merge
|
return files_to_merge
|
||||||
|
|
||||||
def merge_entries(options):
|
def merge_entries(options):
|
||||||
|
|
Loading…
Reference in a new issue