From 9f667a0b35a09318e2006d63c0e6dd4115964f73 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 5 Jul 2021 16:28:44 +0200 Subject: [PATCH] Update code style to new standard --- nw/gui/doceditor.py | 6 +++--- nw/tools/build.py | 4 ++-- tests/test_gui/test_gui_guimain.py | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index 7574d49e..fdcba9b8 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -748,7 +748,7 @@ class GuiDocEditor(QTextEdit): logger.error("Not a document action") return False - logger.verbose("Requesting action: %s" % theAction.name) + logger.verbose("Requesting action: %s", theAction.name) self._allowAutoReplace(False) if theAction == nwDocAction.UNDO: @@ -1722,10 +1722,10 @@ class GuiDocEditor(QTextEdit): return False if loadTag: - logger.verbose("Attempting to follow tag '%s'" % theWord) + logger.verbose("Attempting to follow tag '%s'", theWord) self.theParent.docViewer.loadFromTag(theWord) else: - logger.verbose("Potential tag '%s'" % theWord) + logger.verbose("Potential tag '%s'", theWord) return True diff --git a/nw/tools/build.py b/nw/tools/build.py index 3dba8901..990bb9ec 100644 --- a/nw/tools/build.py +++ b/nw/tools/build.py @@ -726,7 +726,7 @@ class GuiBuildNovel(QDialog): bldObj.doPostProcessing() except Exception: - logger.error("Failed to build document '%s'" % tItem.itemHandle) + logger.error("Failed to build document '%s'", tItem.itemHandle) nw.logException() if isPreview: self.docView.setText(( @@ -743,7 +743,7 @@ class GuiBuildNovel(QDialog): bldObj.closeDocument() tEnd = int(time()) - logger.debug("Built project in %.3f ms" % (1000*(tEnd - tStart))) + logger.debug("Built project in %.3f ms", 1000*(tEnd - tStart)) if bldObj.errData: self.theParent.makeAlert([ diff --git a/tests/test_gui/test_gui_guimain.py b/tests/test_gui/test_gui_guimain.py index 4e1a09f3..8d363a3d 100644 --- a/tests/test_gui/test_gui_guimain.py +++ b/tests/test_gui/test_gui_guimain.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ novelWriter – Main GUI Editor Class Tester ==========================================