From 7fa3eb7d44bd01beaeff145bc1f00a5af37e2751 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 26 Mar 2020 22:41:32 +0100 Subject: [PATCH] Simplify sorting Calling sort_key explicitly is marginally faster, but less readable. Signed-off-by: Gilles Peskine --- scripts/assemble_changelog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/assemble_changelog.py b/scripts/assemble_changelog.py index ea91578c9..ebb056e4a 100755 --- a/scripts/assemble_changelog.py +++ b/scripts/assemble_changelog.py @@ -400,7 +400,7 @@ def list_files_to_merge(options): "Oldest" is defined by `EntryFileSortKey`. """ 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 def merge_entries(options):