Spell check comments and docstrings
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class NWSessionLog:
|
||||
##
|
||||
|
||||
def startSession(self):
|
||||
"""Start the writng session."""
|
||||
"""Start the writing session."""
|
||||
self._start = time()
|
||||
return
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user