From 8d42c86479e031fdcb57548c7241dd97bbe590d4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 13 Oct 2022 18:11:20 +0530 Subject: [PATCH] pep8 --- src/calibre/db/tests/reading.py | 1 + src/calibre/gui2/dialogs/template_dialog.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/db/tests/reading.py b/src/calibre/db/tests/reading.py index 040bdeba3d..8dc85f4c66 100644 --- a/src/calibre/db/tests/reading.py +++ b/src/calibre/db/tests/reading.py @@ -854,6 +854,7 @@ def evaluate(book, ctx): return ','.join(list(ctx.helper_function(tags))) ''' from calibre.utils.formatter import PythonTemplateContext + class CustomContext(PythonTemplateContext): def helper_function(self, arg): s = set(arg) diff --git a/src/calibre/gui2/dialogs/template_dialog.py b/src/calibre/gui2/dialogs/template_dialog.py index 15c8e09ab5..2275192b36 100644 --- a/src/calibre/gui2/dialogs/template_dialog.py +++ b/src/calibre/gui2/dialogs/template_dialog.py @@ -208,7 +208,7 @@ class TemplateHighlighter(QSyntaxHighlighter): # we avoid thinking a # inside a string starts a comment. t = re.sub(self.stringRe, self.replace_strings_with_dash, text) sharp_pos = t.find('#') - if sharp_pos >= 0: # Do we still have a #? + if sharp_pos >= 0: # Do we still have a #? self.setFormat(sharp_pos, len(text), self.Formats["comment"]) self.setCurrentBlockState(NORMAL)