Fix some typos
This commit is contained in:
@@ -349,7 +349,7 @@ class BuildSettings:
|
|||||||
def buildItemFilter(
|
def buildItemFilter(
|
||||||
self, project: NWProject, withRoots: bool = False
|
self, project: NWProject, withRoots: bool = False
|
||||||
) -> dict[str, tuple[bool, FilterMode]]:
|
) -> dict[str, tuple[bool, FilterMode]]:
|
||||||
"""Return a dictionary of item handles with filter decissions
|
"""Return a dictionary of item handles with filter decisions
|
||||||
applied.
|
applied.
|
||||||
"""
|
"""
|
||||||
result: dict[str, tuple[bool, FilterMode]] = {}
|
result: dict[str, tuple[bool, FilterMode]] = {}
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class NWProjectData:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def autoReplace(self) -> dict[str, str]:
|
def autoReplace(self) -> dict[str, str]:
|
||||||
"""Return the autoreplace dictionary."""
|
"""Return the auto-replace dictionary."""
|
||||||
return self._autoReplace
|
return self._autoReplace
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ class Tokenizer(ABC):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def setChapterFormat(self, hFormat: str) -> None:
|
def setChapterFormat(self, hFormat: str) -> None:
|
||||||
"""Set the chapert format pattern."""
|
"""Set the chapter format pattern."""
|
||||||
self._fmtChapter = hFormat.strip()
|
self._fmtChapter = hFormat.strip()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -435,8 +435,8 @@ class Tokenizer(ABC):
|
|||||||
if aLine[0] == "[":
|
if aLine[0] == "[":
|
||||||
# Parse special formatting line
|
# Parse special formatting line
|
||||||
# This must be a separate if statement, as it may not
|
# This must be a separate if statement, as it may not
|
||||||
# reach a continue statement and must thefore proceed to
|
# reach a continue statement and must therefore proceed
|
||||||
# check other formats.
|
# to check other formats.
|
||||||
|
|
||||||
if sLine in ("[newpage]", "[new page]"):
|
if sLine in ("[newpage]", "[new page]"):
|
||||||
breakNext = True
|
breakNext = True
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ class ToOdt(Tokenizer):
|
|||||||
# Setters
|
# Setters
|
||||||
##
|
##
|
||||||
|
|
||||||
def setLanguage(self, language: str) -> None:
|
def setLanguage(self, language: str | None) -> None:
|
||||||
"""Set language for the document."""
|
"""Set language for the document."""
|
||||||
if language:
|
if language:
|
||||||
langBits = language.split("_")
|
langBits = language.split("_")
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class GuiTextDocument(QTextDocument):
|
|||||||
return self._syntax
|
return self._syntax
|
||||||
|
|
||||||
##
|
##
|
||||||
# Metods
|
# Methods
|
||||||
##
|
##
|
||||||
|
|
||||||
def setTextContent(self, text: str, tHandle: str) -> None:
|
def setTextContent(self, text: str, tHandle: str) -> None:
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class GuiMainStatus(QStatusBar):
|
|||||||
self.addPermanentWidget(self.statsText)
|
self.addPermanentWidget(self.statsText)
|
||||||
|
|
||||||
# The Session Clock
|
# 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.timeIcon = QLabel()
|
||||||
self.timeText = QLabel("")
|
self.timeText = QLabel("")
|
||||||
self.timeText.setToolTip(self.tr("Session Time"))
|
self.timeText.setToolTip(self.tr("Session Time"))
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ class _DetailsWidget(QWidget):
|
|||||||
|
|
||||||
self._initExpanded = True
|
self._initExpanded = True
|
||||||
|
|
||||||
# Tree Vidget
|
# Tree Widget
|
||||||
self.listView = QTreeWidget(self)
|
self.listView = QTreeWidget(self)
|
||||||
self.listView.setHeaderLabels([self.tr("Setting"), self.tr("Value")])
|
self.listView.setHeaderLabels([self.tr("Setting"), self.tr("Value")])
|
||||||
self.listView.setIndentation(SHARED.theme.baseIconSize)
|
self.listView.setIndentation(SHARED.theme.baseIconSize)
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class GuiWritingStats(QDialog):
|
|||||||
pOptions.getInt("GuiWritingStats", "sortOrder", Qt.DescendingOrder),
|
pOptions.getInt("GuiWritingStats", "sortOrder", Qt.DescendingOrder),
|
||||||
(Qt.AscendingOrder, Qt.DescendingOrder), Qt.DescendingOrder
|
(Qt.AscendingOrder, Qt.DescendingOrder), Qt.DescendingOrder
|
||||||
)
|
)
|
||||||
self.listBox.sortByColumn(sortCol, sortOrder)
|
self.listBox.sortByColumn(sortCol, sortOrder) # type: ignore
|
||||||
self.listBox.setSortingEnabled(True)
|
self.listBox.setSortingEnabled(True)
|
||||||
|
|
||||||
# Word Bar
|
# Word Bar
|
||||||
|
|||||||
Reference in New Issue
Block a user