From 7f5be63f258bf1831a7e54f02caf5f715bceadcb Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Wed, 11 Oct 2023 18:37:58 +0100 Subject: [PATCH] Forgot to update the default value after changing to using sets --- src/calibre/db/categories.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/db/categories.py b/src/calibre/db/categories.py index 55a27a4bbe..d219a3e088 100644 --- a/src/calibre/db/categories.py +++ b/src/calibre/db/categories.py @@ -159,7 +159,7 @@ def sort_key_for_rating(x, hierarchical_categories=None): # sort above "foo a.bar". Without this substitution "foo.bar" sorts below "foo # a.bar" because '.' sorts higher than space. -def sort_key_for_name_and_first_letter(x, hierarchical_categories={}): +def sort_key_for_name_and_first_letter(x, hierarchical_categories=set()): v1 = icu_upper(x.sort or x.name) if x.category in hierarchical_categories: v1 = v1.replace('.', '\t') @@ -170,7 +170,7 @@ def sort_key_for_name_and_first_letter(x, hierarchical_categories={}): return (c if numeric_collation and c.isdigit() else '9999999999', collation_order(v2), sort_key(v1)) -def sort_key_for_name(x, hierarchical_categories={}): +def sort_key_for_name(x, hierarchical_categories=set()): v = x.sort or x.name if x.category not in hierarchical_categories: return sort_key(v)