From 17fc370609a93340e805c014acd0d2fa32b7d4a9 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 18 Nov 2023 14:14:10 +0100 Subject: [PATCH] Fix some typos --- novelwriter/core/buildsettings.py | 2 +- novelwriter/core/projectdata.py | 2 +- novelwriter/core/tokenizer.py | 6 +++--- novelwriter/core/toodt.py | 2 +- novelwriter/gui/editordocument.py | 2 +- novelwriter/gui/statusbar.py | 2 +- novelwriter/tools/manuscript.py | 2 +- novelwriter/tools/writingstats.py | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/novelwriter/core/buildsettings.py b/novelwriter/core/buildsettings.py index 84dd7ff2..cc735192 100644 --- a/novelwriter/core/buildsettings.py +++ b/novelwriter/core/buildsettings.py @@ -349,7 +349,7 @@ class BuildSettings: def buildItemFilter( self, project: NWProject, withRoots: bool = False ) -> dict[str, tuple[bool, FilterMode]]: - """Return a dictionary of item handles with filter decissions + """Return a dictionary of item handles with filter decisions applied. """ result: dict[str, tuple[bool, FilterMode]] = {} diff --git a/novelwriter/core/projectdata.py b/novelwriter/core/projectdata.py index d248a7a1..283056bb 100644 --- a/novelwriter/core/projectdata.py +++ b/novelwriter/core/projectdata.py @@ -170,7 +170,7 @@ class NWProjectData: @property def autoReplace(self) -> dict[str, str]: - """Return the autoreplace dictionary.""" + """Return the auto-replace dictionary.""" return self._autoReplace @property diff --git a/novelwriter/core/tokenizer.py b/novelwriter/core/tokenizer.py index 4f4a8378..a4e7f61a 100644 --- a/novelwriter/core/tokenizer.py +++ b/novelwriter/core/tokenizer.py @@ -216,7 +216,7 @@ class Tokenizer(ABC): return def setChapterFormat(self, hFormat: str) -> None: - """Set the chapert format pattern.""" + """Set the chapter format pattern.""" self._fmtChapter = hFormat.strip() return @@ -435,8 +435,8 @@ class Tokenizer(ABC): if aLine[0] == "[": # Parse special formatting line # This must be a separate if statement, as it may not - # reach a continue statement and must thefore proceed to - # check other formats. + # reach a continue statement and must therefore proceed + # to check other formats. if sLine in ("[newpage]", "[new page]"): breakNext = True diff --git a/novelwriter/core/toodt.py b/novelwriter/core/toodt.py index 6fe6f781..aec5eefb 100644 --- a/novelwriter/core/toodt.py +++ b/novelwriter/core/toodt.py @@ -195,7 +195,7 @@ class ToOdt(Tokenizer): # Setters ## - def setLanguage(self, language: str) -> None: + def setLanguage(self, language: str | None) -> None: """Set language for the document.""" if language: langBits = language.split("_") diff --git a/novelwriter/gui/editordocument.py b/novelwriter/gui/editordocument.py index 160e85ed..aa00ec7c 100644 --- a/novelwriter/gui/editordocument.py +++ b/novelwriter/gui/editordocument.py @@ -64,7 +64,7 @@ class GuiTextDocument(QTextDocument): return self._syntax ## - # Metods + # Methods ## def setTextContent(self, text: str, tHandle: str) -> None: diff --git a/novelwriter/gui/statusbar.py b/novelwriter/gui/statusbar.py index cb5ca85a..76a94454 100644 --- a/novelwriter/gui/statusbar.py +++ b/novelwriter/gui/statusbar.py @@ -97,7 +97,7 @@ class GuiMainStatus(QStatusBar): self.addPermanentWidget(self.statsText) # The Session Clock - # Set the mimimum width so the label doesn't rescale every second + # Set the minimum width so the label doesn't rescale every second self.timeIcon = QLabel() self.timeText = QLabel("") self.timeText.setToolTip(self.tr("Session Time")) diff --git a/novelwriter/tools/manuscript.py b/novelwriter/tools/manuscript.py index 34e7f2cf..e166ffbb 100644 --- a/novelwriter/tools/manuscript.py +++ b/novelwriter/tools/manuscript.py @@ -507,7 +507,7 @@ class _DetailsWidget(QWidget): self._initExpanded = True - # Tree Vidget + # Tree Widget self.listView = QTreeWidget(self) self.listView.setHeaderLabels([self.tr("Setting"), self.tr("Value")]) self.listView.setIndentation(SHARED.theme.baseIconSize) diff --git a/novelwriter/tools/writingstats.py b/novelwriter/tools/writingstats.py index cc43a510..e8e4edef 100644 --- a/novelwriter/tools/writingstats.py +++ b/novelwriter/tools/writingstats.py @@ -125,7 +125,7 @@ class GuiWritingStats(QDialog): pOptions.getInt("GuiWritingStats", "sortOrder", Qt.DescendingOrder), (Qt.AscendingOrder, Qt.DescendingOrder), Qt.DescendingOrder ) - self.listBox.sortByColumn(sortCol, sortOrder) + self.listBox.sortByColumn(sortCol, sortOrder) # type: ignore self.listBox.setSortingEnabled(True) # Word Bar