Fix linting errors for new rules

This commit is contained in:
Veronica Berglyd Olsen
2025-07-17 19:47:46 +02:00
parent 4bc4c1e204
commit f7366cb2ff
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -827,13 +827,13 @@ def testGuiMain_OpenClose(qtbot, monkeypatch, nwGUI, projPath, fncPath, mockRnd)
# Handle broken index on project open # Handle broken index on project open
nwGUI.closeProject() nwGUI.closeProject()
idxPath: Path = projPath / "meta" / nwFiles.INDEX_FILE idxPath: Path = projPath / "meta" / nwFiles.INDEX_FILE
assert idxPath.read_text() != "{}" assert idxPath.read_text(encoding="utf-8") != "{}"
idxPath.write_text("{}") idxPath.write_text("{}", encoding="utf-8")
assert idxPath.read_text() == "{}" assert idxPath.read_text(encoding="utf-8") == "{}"
nwGUI.openProject(projPath) nwGUI.openProject(projPath)
nwGUI.saveProject() nwGUI.saveProject()
assert idxPath.read_text() != "{}" assert idxPath.read_text(encoding="utf-8") != "{}"
assert nwGUI.docEditor.docHandle == C.hSceneDoc assert nwGUI.docEditor.docHandle == C.hSceneDoc
assert nwGUI.docViewer.docHandle == C.hTitlePage assert nwGUI.docViewer.docHandle == C.hTitlePage
+2 -2
View File
@@ -213,7 +213,7 @@ def testGuiTheme_SpecialColors(tstPaths):
theme.iconCache = MagicMock() theme.iconCache = MagicMock()
testTheme: Path = tstPaths.cnfDir / "themes" / "test.conf" testTheme: Path = tstPaths.cnfDir / "themes" / "test.conf"
testTheme.write_text( testTheme.write_text((
"[Main]\n" "[Main]\n"
"name = Test\n" "name = Test\n"
"mode = light\n" "mode = light\n"
@@ -241,7 +241,7 @@ def testGuiTheme_SpecialColors(tstPaths):
"[Palette]\n" "[Palette]\n"
"window = #000000\n" "window = #000000\n"
"text = #ffffff\n" "text = #ffffff\n"
) ), encoding="utf-8")
theme._scanThemes([testTheme]) theme._scanThemes([testTheme])
assert len(theme.colourThemes) == 1 assert len(theme.colourThemes) == 1
CONFIG.themeMode = nwTheme.LIGHT CONFIG.themeMode = nwTheme.LIGHT