Fix type checking warning

This commit is contained in:
Veronica Berglyd Olsen
2023-09-04 20:12:26 +02:00
parent e8b2f3a8f9
commit ca3a493932
+3 -4
View File
@@ -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