Fix flake8 complaints

This commit is contained in:
Veronica K. B. Olsen
2021-02-15 17:01:38 +01:00
parent 89cf28fade
commit 6d56bc7c0c
4 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -302,8 +302,7 @@ class NWProject():
nHandle = self.newRoot(self.tr("Novel"), nwItemClass.NOVEL)
for newRoot in projData.get("addRoots", []):
if newRoot in nwItemClass:
self.newRoot(trConst(nwLabels.CLASS_NAME[newRoot]), newRoot
)
self.newRoot(trConst(nwLabels.CLASS_NAME[newRoot]), newRoot)
# Create a title page
tHandle = self.newFile(self.tr("Title Page"), nwItemClass.NOVEL, nHandle)
@@ -490,9 +489,10 @@ class NWProject():
self.tr(
"Note that after the upgrade, you cannot open the project with "
"an older version of novelWriter any more, so make sure you "
"have a recent backup.")
"have a recent backup."
)
)
)
if not msgYes:
self.clearProject()
return False
+5 -4
View File
@@ -157,10 +157,11 @@ class GuiAbout(QDialog):
"<p>%s</p>" % (
self.tr(
"See the License tab for the full license text, or visit the "
"GNU website at {0} for more details.").format(
"<a href=\"https://www.gnu.org/licenses/gpl-3.0.html\">GPL v3.0</a>"
)
),
"GNU website at {0} for more details."
).format(
"<a href=\"https://www.gnu.org/licenses/gpl-3.0.html\">GPL v3.0</a>"
)
),
"<h3>%s</h3>" % self.tr("Credits"),
"<p>{credits:s}</p>",
]).format(
+2 -2
View File
@@ -974,8 +974,8 @@ class GuiProjectTree(QTreeWidget):
else:
self.makeAlert(
self.tr(
"There is nowhere to add item with name '{0}'").format(nwItem.itemName
), nwAlert.ERROR
"There is nowhere to add item with name '{0}'"
).format(nwItem.itemName), nwAlert.ERROR
)
del self._treeMap[tHandle]
return None
-1
View File
@@ -28,7 +28,6 @@ from dummy import causeOSError
from tools import readFile, writeFile
from nw.core.spellcheck import NWSpellCheck, NWSpellEnchant, NWSpellSimple
from nw.constants import nwConst
@pytest.mark.core
def testCoreSpell_Super(monkeypatch, tmpDir, tmpConf):