This commit is contained in:
Kovid Goyal 2022-07-15 16:14:55 +05:30
parent 6b585c49fb
commit 2d0816daa0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 3 additions and 4 deletions

View File

@ -747,7 +747,6 @@ class ReadingTest(BaseTest):
# }}} # }}}
def test_template_db_functions(self): # {{{ def test_template_db_functions(self): # {{{
from calibre.ebooks.metadata.book.base import Metadata
from calibre.ebooks.metadata.book.formatter import SafeFormat from calibre.ebooks.metadata.book.formatter import SafeFormat
formatter = SafeFormat() formatter = SafeFormat()

View File

@ -328,7 +328,7 @@ class SearchDialog(QDialog):
# dialog to help test the template # dialog to help test the template
from calibre.gui2.ui import get_gui from calibre.gui2.ui import get_gui
view = get_gui().library_view view = get_gui().library_view
rows = view.selectionModel().selectedRows()[0:10] # Maximum of 10 books rows = view.selectionModel().selectedRows()[0:10] # Maximum of 10 books
mi = [db.new_api.get_proxy_metadata(db.data.index_to_id(x.row())) for x in rows] mi = [db.new_api.get_proxy_metadata(db.data.index_to_id(x.row())) for x in rows]
self.template_program_box.set_mi(mi) self.template_program_box.set_mi(mi)

View File

@ -12,7 +12,7 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
import inspect, re, traceback, numbers import inspect, re, traceback, numbers
from contextlib import contextmanager, suppress from contextlib import suppress
from datetime import datetime, timedelta from datetime import datetime, timedelta
from functools import partial from functools import partial
from math import trunc, floor, ceil, modf from math import trunc, floor, ceil, modf

View File

@ -152,7 +152,7 @@ class Parser:
REPLACEMENTS = tuple(('\\' + x, codepoint_to_chr(i + 1)) for i, x in enumerate('\\"()')) REPLACEMENTS = tuple(('\\' + x, codepoint_to_chr(i + 1)) for i, x in enumerate('\\"()'))
# the sep must be a printable character sequence that won't actually appear naturally # the sep must be a printable character sequence that won't actually appear naturally
docstring_sep = '□ༀ؆' # Unicode white square, Tibetian Om, Arabic-Indic Cube Root docstring_sep = '□ༀ؆' # Unicode white square, Tibetian Om, Arabic-Indic Cube Root
# Had to translate named constants to numeric values # Had to translate named constants to numeric values
lex_scanner = re.Scanner([ lex_scanner = re.Scanner([