Spell check comments and docstrings

This commit is contained in:
Veronica Berglyd Olsen
2023-07-20 23:25:49 +02:00
parent e773884c29
commit 4dfa51855e
45 changed files with 122 additions and 175 deletions
+1 -1
View File
@@ -493,7 +493,7 @@ class BuildCollection:
return
def builds(self) -> Iterable[tuple[str, str]]:
"""Iterate over all avaiable builds."""
"""Iterate over all available builds."""
for buildID in self._builds:
yield buildID, self._builds[buildID].get("name", "")
return
+1 -1
View File
@@ -309,7 +309,7 @@ class DocDuplicator:
class ProjectBuilder:
"""A class to build a new project from a set of user-defined
parameter provided by the New Projecty Wizard.
parameter provided by the New Project Wizard.
"""
def __init__(self, mainGui: GuiMain) -> None:
+1 -1
View File
@@ -87,7 +87,7 @@ class NWDocument:
def readDocument(self, isOrphan: bool = False) -> str | None:
"""Read the document specified by the handle set in the
contructor, capturing potential file system errors and parse
constructor, capturing potential file system errors and parse
meta data. If the document doesn't exist on disk, return an
empty string. If something went wrong, return None.
"""
+1 -1
View File
@@ -730,7 +730,7 @@ class TagsIndex:
class ItemIndex:
"""Core: Item Index Wrapper Class
A wrapper object holding the indexed items. This is a warapper
A wrapper object holding the indexed items. This is a wrapper
class around a single storage dictionary with a set of utility
functions for setting and accessing the index data. Each indexed
item is stored in an IndexItem object, which again holds an
+1 -1
View File
@@ -67,7 +67,7 @@ class NWProject(QObject):
self._storage = NWStorage(self) # The project storage handler
self._data = NWProjectData(self) # The project settings
self._tree = NWTree(self) # The project tree
self._index = NWIndex(self) # The projecty index
self._index = NWIndex(self) # The project index
self._session = NWSessionLog(self) # The session record
# Data Cache
+1 -1
View File
@@ -252,7 +252,7 @@ class NWProjectData:
return
def setEditTime(self, value: Any):
"""Set tyje edit time from last session."""
"""Set the edit time from last session."""
self._editTime = checkInt(value, 0)
self.theProject.setProjectChanged(True)
return
+4 -4
View File
@@ -97,12 +97,12 @@ class ProjectXMLReader:
1.4 Introduces a more compact format for storing items. All settings
aside from name are now attributes. This format also changes the
way satus and importance labels are stored. This format was only
way status and importance labels are stored. This format was only
a part of version 2.0 RC 1
1.5 The actual format released for 2.0. It moves last used handles
and title formats into a key/value format similar to auto-
replace, status and imporetance. It adds the heading value to
replace, status and importance. It adds the heading value to
the content item meta entry. It also moves meta data related to
the project or the content into their respective section nodes
as attributes. The id attribute was also added to the project.
@@ -452,7 +452,7 @@ class ProjectXMLReader:
def _parseDictKeyText(self, xItem: ET.Element) -> dict:
"""Parse a dictionary stored with key as an attribute and the
value as the text porperty.
value as the text property.
"""
result = {}
for xEntry in xItem:
@@ -462,7 +462,7 @@ class ProjectXMLReader:
def _parseDictTagText(self, xItem):
"""Parse a dictionary stored with key as the tag and the value
as the text porperty.
as the text property.
"""
return {xNode.tag: checkString(xNode.text, "") for xNode in xItem}
+1 -1
View File
@@ -66,7 +66,7 @@ class NWSessionLog:
##
def startSession(self):
"""Start the writng session."""
"""Start the writing session."""
self._start = time()
return
+2 -2
View File
@@ -110,7 +110,7 @@ class NWStorage:
"""
inPath = Path(path).resolve()
if inPath.is_file():
# The path should not point to an exisitng file,
# The path should not point to an existing file,
# but it can point to a folder containing files
inPath = inPath.parent
@@ -313,7 +313,7 @@ class NWStorage:
if not checkLegacy:
# The legacy content check is only needed for project folder
# storage, so if it is not expected to be that, there's no
# need for the remaning checks.
# need for the remaining checks.
return True
legacy = _LegacyStorage(self._project)
+1 -1
View File
@@ -147,7 +147,7 @@ class ToOdt(Tokenizer):
self._dLanguage = "en"
self._dCountry = "GB"
# Text Margings
# Text Margins
self._mTopTitle = "0.423cm"
self._mTopHead1 = "0.423cm"
self._mTopHead2 = "0.353cm"
+1 -1
View File
@@ -126,7 +126,7 @@ class NWTree:
return None
def pack(self) -> list[dict]:
"""Pack the content of the tree into a list of doctionaries of
"""Pack the content of the tree into a list of dictionaries of
items. In the order defined by the _treeOrder list.
"""
tree = []