From e4ebd72a6971d2e63f293c02dea3892530f3a4f3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 9 Jul 2022 20:31:02 +0530 Subject: [PATCH] pep8 --- src/calibre/db/fields.py | 1 + src/calibre/utils/formatter_functions.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/db/fields.py b/src/calibre/db/fields.py index c4fce8cd2d..5c36202366 100644 --- a/src/calibre/db/fields.py +++ b/src/calibre/db/fields.py @@ -23,6 +23,7 @@ from polyglot.builtins import iteritems rendering_composite_name = '__rendering_composite__' + def bool_sort_key(bools_are_tristate): return (lambda x:{True: 1, False: 2, None: 3}.get(x, 3)) if bools_are_tristate else lambda x:{True: 1, False: 2, None: 2}.get(x, 2) diff --git a/src/calibre/utils/formatter_functions.py b/src/calibre/utils/formatter_functions.py index a3536978a4..e19c94f1ef 100644 --- a/src/calibre/utils/formatter_functions.py +++ b/src/calibre/utils/formatter_functions.py @@ -2245,7 +2245,7 @@ class BuiltinBookCount(BuiltinFormatterFunction): ids = get_gui().current_db.search_getting_ids(query, None, use_virtual_library=use_vl != '0') return len(ids) - except Exception as e: + except Exception: traceback.print_exc() return _('This function can be used only in the GUI')