From ca3a493932ec960d56c8214d103dad1801fa1d27 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:12:26 +0200 Subject: [PATCH] Fix type checking warning --- novelwriter/gui/doceditor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index a1413aee..58f718f4 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -460,9 +460,8 @@ class GuiDocEditor(QTextEdit): return True - def updateTagHighLighting(self): - """Rerun the syntax highlighter on all meta data lines. - """ + def updateTagHighLighting(self) -> None: + """Rerun the syntax highlighter on all meta data lines.""" self.highLight.rehighlightByType(GuiDocHighlighter.BLOCK_META) return @@ -672,7 +671,7 @@ class GuiDocEditor(QTextEdit): self._nwItem.setCursorPos(cursPos) return - def setCursorLine(self, line: int) -> bool: + def setCursorLine(self, line: int | None) -> bool: """Move the cursor to a given line in the document.""" if not isinstance(line, int): return False