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