diff --git a/nw/convert/tokenizer.py b/nw/convert/tokenizer.py index f891a9f7..59508d4c 100644 --- a/nw/convert/tokenizer.py +++ b/nw/convert/tokenizer.py @@ -32,7 +32,7 @@ import nw from operator import itemgetter from PyQt5.QtCore import QRegularExpression -from nw.project.document import NWDoc +from nw.core.document import NWDoc from nw.tools.translate import numberToWord from nw.constants import nwItemLayout diff --git a/nw/core/__init__.py b/nw/core/__init__.py new file mode 100644 index 00000000..8bc04dcd --- /dev/null +++ b/nw/core/__init__.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from nw.core.document import NWDoc +from nw.core.index import NWIndex +from nw.core.project import NWProject + +__all__ = [ + "NWDoc", + "NWIndex", + "NWProject", +] diff --git a/nw/project/document.py b/nw/core/document.py similarity index 100% rename from nw/project/document.py rename to nw/core/document.py diff --git a/nw/project/index.py b/nw/core/index.py similarity index 100% rename from nw/project/index.py rename to nw/core/index.py diff --git a/nw/project/project.py b/nw/core/project.py similarity index 100% rename from nw/project/project.py rename to nw/core/project.py diff --git a/nw/gui/dialogs/docmerge.py b/nw/gui/dialogs/docmerge.py index 887e8b72..097f4217 100644 --- a/nw/gui/dialogs/docmerge.py +++ b/nw/gui/dialogs/docmerge.py @@ -34,7 +34,7 @@ from PyQt5.QtWidgets import ( QListWidget, QAbstractItemView, QListWidgetItem ) from nw.constants import nwAlert, nwItemType -from nw.project import NWDoc +from nw.core import NWDoc logger = logging.getLogger(__name__) diff --git a/nw/gui/dialogs/docsplit.py b/nw/gui/dialogs/docsplit.py index 55be4ee4..bfb4e8ee 100644 --- a/nw/gui/dialogs/docsplit.py +++ b/nw/gui/dialogs/docsplit.py @@ -34,7 +34,7 @@ from PyQt5.QtWidgets import ( QListWidget, QAbstractItemView, QListWidgetItem ) from nw.constants import nwAlert, nwItemType, nwItemClass, nwItemLayout -from nw.project import NWDoc +from nw.core import NWDoc logger = logging.getLogger(__name__) diff --git a/nw/gui/elements/doceditor.py b/nw/gui/elements/doceditor.py index 7681fe62..f7d494e1 100644 --- a/nw/gui/elements/doceditor.py +++ b/nw/gui/elements/doceditor.py @@ -39,7 +39,7 @@ from PyQt5.QtGui import ( QTextDocument, QCursor ) -from nw.project import NWDoc +from nw.core import NWDoc from nw.gui.tools import GuiDocHighlighter, WordCounter from nw.gui.elements.doctitlebar import GuiDocTitleBar from nw.tools import NWSpellSimple diff --git a/nw/gui/elements/doctree.py b/nw/gui/elements/doctree.py index 09330346..92a006de 100644 --- a/nw/gui/elements/doctree.py +++ b/nw/gui/elements/doctree.py @@ -34,7 +34,7 @@ from PyQt5.QtWidgets import ( QTreeWidget, QTreeWidgetItem, QAbstractItemView, QApplication, QMessageBox ) -from nw.project import NWDoc +from nw.core import NWDoc from nw.constants import ( nwLabels, nwItemType, nwItemClass, nwItemLayout, nwAlert ) diff --git a/nw/guimain.py b/nw/guimain.py index 935c1fb2..4241c043 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -45,7 +45,7 @@ from nw.gui import ( GuiConfigEditor, GuiProjectEditor, GuiItemEditor, GuiProjectOutline, GuiSessionLogView, GuiDocMerge, GuiDocSplit, GuiProjectLoad ) -from nw.project import NWProject, NWDoc, NWIndex +from nw.core import NWProject, NWDoc, NWIndex from nw.tools import countWords from nw.constants import nwFiles, nwItemType, nwAlert diff --git a/nw/project/__init__.py b/nw/project/__init__.py deleted file mode 100644 index f2a0fe0c..00000000 --- a/nw/project/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: utf-8 -*- - -from nw.project.document import NWDoc -from nw.project.index import NWIndex -from nw.project.project import NWProject - -__all__ = [ - "NWDoc", - "NWIndex", - "NWProject", -] diff --git a/tests/test_item.py b/tests/test_item.py index b58f1b7e..64268e62 100644 --- a/tests/test_item.py +++ b/tests/test_item.py @@ -9,7 +9,7 @@ from lxml import etree from nwdummy import DummyMain from nw.config import Config -from nw.project.project import NWProject, NWItem +from nw.core.project import NWProject, NWItem from nw.constants import nwItemClass, nwItemType, nwItemLayout theConf = Config() diff --git a/tests/test_project.py b/tests/test_project.py index c029fbba..7d920a37 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -10,8 +10,8 @@ from nwtools import * from nwdummy import DummyMain from nw.config import Config -from nw.project.project import NWProject -from nw.project.index import NWIndex +from nw.core.project import NWProject +from nw.core.index import NWIndex from nw.constants import nwItemClass theConf = Config()