Rename NWDoc class to NWDocument

This commit is contained in:
Veronica Berglyd Olsen
2022-11-07 22:51:09 +01:00
parent 26f7bb4b32
commit 262a6c36b7
4 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -34,7 +34,7 @@ from novelwriter.common import isHandle, sha256sum
logger = logging.getLogger(__name__)
class NWDoc:
class NWDocument:
def __init__(self, theProject, theHandle):
@@ -58,7 +58,7 @@ class NWDoc:
return
def __repr__(self):
return f"<NWDoc handle={self._docHandle}>"
return f"<NWDocument handle={self._docHandle}>"
def __bool__(self):
return self._docHandle is not None and bool(self._theItem)
@@ -277,4 +277,4 @@ class NWDoc:
return
# END Class NWDoc
# END Class NWDocument
+3 -3
View File
@@ -30,7 +30,7 @@ from time import time
from pathlib import Path
from novelwriter.constants import nwFiles
from novelwriter.core.document import NWDoc
from novelwriter.core.document import NWDocument
from novelwriter.core.projectxml import ProjectXMLReader, ProjectXMLWriter
from novelwriter.error import logException
@@ -159,8 +159,8 @@ class NWStorage:
"""Return a document wrapper object.
"""
if self._runtimePath is not None:
return NWDoc(self.theProject, tHandle)
return NWDoc(self.theProject, None)
return NWDocument(self.theProject, tHandle)
return NWDocument(self.theProject, None)
def getMetaFile(self, fileName):
"""Return the path to a file in the project meta folder.