Use direct imports everywhere (#1262)
This commit is contained in:
@@ -1,40 +0,0 @@
|
|||||||
"""
|
|
||||||
novelWriter – Core Init
|
|
||||||
=======================
|
|
||||||
|
|
||||||
This file is a part of novelWriter
|
|
||||||
Copyright 2018–2022, Veronica Berglyd Olsen
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from novelwriter.core.coretools import DocMerger, DocSplitter, ProjectBuilder
|
|
||||||
from novelwriter.core.index import countWords
|
|
||||||
from novelwriter.core.project import NWProject
|
|
||||||
from novelwriter.core.spellcheck import NWSpellEnchant
|
|
||||||
from novelwriter.core.tohtml import ToHtml
|
|
||||||
from novelwriter.core.toodt import ToOdt
|
|
||||||
from novelwriter.core.tomd import ToMarkdown
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"DocMerger",
|
|
||||||
"DocSplitter",
|
|
||||||
"ProjectBuilder",
|
|
||||||
"countWords",
|
|
||||||
"NWProject",
|
|
||||||
"NWSpellEnchant",
|
|
||||||
"ToHtml",
|
|
||||||
"ToOdt",
|
|
||||||
"ToMarkdown",
|
|
||||||
]
|
|
||||||
@@ -36,10 +36,8 @@ from pathlib import Path
|
|||||||
|
|
||||||
from novelwriter.enum import nwItemType, nwItemLayout
|
from novelwriter.enum import nwItemType, nwItemLayout
|
||||||
from novelwriter.error import logException
|
from novelwriter.error import logException
|
||||||
|
from novelwriter.common import checkInt, isHandle, isItemClass, isTitleTag, jsonEncode
|
||||||
from novelwriter.constants import nwFiles, nwKeyWords, nwUnicode, nwHeaders
|
from novelwriter.constants import nwFiles, nwKeyWords, nwUnicode, nwHeaders
|
||||||
from novelwriter.common import (
|
|
||||||
checkInt, isHandle, isItemClass, isTitleTag, jsonEncode
|
|
||||||
)
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ from time import time
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile
|
from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile
|
||||||
|
|
||||||
|
from novelwriter.error import logException
|
||||||
from novelwriter.common import minmax
|
from novelwriter.common import minmax
|
||||||
from novelwriter.constants import nwFiles
|
from novelwriter.constants import nwFiles
|
||||||
from novelwriter.core.document import NWDocument
|
from novelwriter.core.document import NWDocument
|
||||||
from novelwriter.core.projectxml import ProjectXMLReader, ProjectXMLWriter
|
from novelwriter.core.projectxml import ProjectXMLReader, ProjectXMLWriter
|
||||||
from novelwriter.error import logException
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from novelwriter.core.tokenizer import Tokenizer
|
|
||||||
from novelwriter.constants import nwKeyWords, nwLabels, nwHtmlUnicode
|
from novelwriter.constants import nwKeyWords, nwLabels, nwHtmlUnicode
|
||||||
|
from novelwriter.core.tokenizer import Tokenizer
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
"""
|
|
||||||
novelWriter – Dialogs Init
|
|
||||||
==========================
|
|
||||||
|
|
||||||
This file is a part of novelWriter
|
|
||||||
Copyright 2018–2022, Veronica Berglyd Olsen
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from novelwriter.dialogs.about import GuiAbout
|
|
||||||
from novelwriter.dialogs.docmerge import GuiDocMerge
|
|
||||||
from novelwriter.dialogs.docsplit import GuiDocSplit
|
|
||||||
from novelwriter.dialogs.editlabel import GuiEditLabel
|
|
||||||
from novelwriter.dialogs.preferences import GuiPreferences
|
|
||||||
from novelwriter.dialogs.projdetails import GuiProjectDetails
|
|
||||||
from novelwriter.dialogs.projload import GuiProjectLoad
|
|
||||||
from novelwriter.dialogs.projsettings import GuiProjectSettings
|
|
||||||
from novelwriter.dialogs.quotes import GuiQuoteSelect
|
|
||||||
from novelwriter.dialogs.updates import GuiUpdates
|
|
||||||
from novelwriter.dialogs.wordlist import GuiWordList
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"GuiAbout",
|
|
||||||
"GuiDocMerge",
|
|
||||||
"GuiDocSplit",
|
|
||||||
"GuiEditLabel",
|
|
||||||
"GuiPreferences",
|
|
||||||
"GuiProjectDetails",
|
|
||||||
"GuiProjectLoad",
|
|
||||||
"GuiProjectSettings",
|
|
||||||
"GuiQuoteSelect",
|
|
||||||
"GuiUpdates",
|
|
||||||
"GuiWordList",
|
|
||||||
]
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
"""
|
|
||||||
novelWriter – GUI Init
|
|
||||||
======================
|
|
||||||
|
|
||||||
This file is a part of novelWriter
|
|
||||||
Copyright 2018–2022, Veronica Berglyd Olsen
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from novelwriter.gui.doceditor import GuiDocEditor
|
|
||||||
from novelwriter.gui.docviewer import GuiDocViewer, GuiDocViewDetails
|
|
||||||
from novelwriter.gui.itemdetails import GuiItemDetails
|
|
||||||
from novelwriter.gui.mainmenu import GuiMainMenu
|
|
||||||
from novelwriter.gui.noveltree import GuiNovelView
|
|
||||||
from novelwriter.gui.outline import GuiOutlineView
|
|
||||||
from novelwriter.gui.projtree import GuiProjectView
|
|
||||||
from novelwriter.gui.statusbar import GuiMainStatus
|
|
||||||
from novelwriter.gui.theme import GuiTheme
|
|
||||||
from novelwriter.gui.sidebar import GuiSideBar
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"GuiDocEditor",
|
|
||||||
"GuiDocViewDetails",
|
|
||||||
"GuiDocViewer",
|
|
||||||
"GuiItemDetails",
|
|
||||||
"GuiMainMenu",
|
|
||||||
"GuiMainStatus",
|
|
||||||
"GuiNovelView",
|
|
||||||
"GuiOutlineView",
|
|
||||||
"GuiProjectView",
|
|
||||||
"GuiTheme",
|
|
||||||
"GuiSideBar",
|
|
||||||
]
|
|
||||||
@@ -50,10 +50,11 @@ from PyQt5.QtWidgets import (
|
|||||||
QFrame
|
QFrame
|
||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.core import NWSpellEnchant, countWords
|
|
||||||
from novelwriter.enum import nwAlert, nwDocAction, nwDocInsert, nwDocMode, nwItemClass
|
from novelwriter.enum import nwAlert, nwDocAction, nwDocInsert, nwDocMode, nwItemClass
|
||||||
from novelwriter.common import minmax, transferCase
|
from novelwriter.common import minmax, transferCase
|
||||||
from novelwriter.constants import nwConst, nwFiles, nwKeyWords, nwUnicode
|
from novelwriter.constants import nwConst, nwFiles, nwKeyWords, nwUnicode
|
||||||
|
from novelwriter.core.index import countWords
|
||||||
|
from novelwriter.core.spellcheck import NWSpellEnchant
|
||||||
from novelwriter.gui.dochighlight import GuiDocHighlighter
|
from novelwriter.gui.dochighlight import GuiDocHighlighter
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ from PyQt5.QtGui import (
|
|||||||
QColor, QTextCharFormat, QFont, QSyntaxHighlighter, QBrush
|
QColor, QTextCharFormat, QFont, QSyntaxHighlighter, QBrush
|
||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.constants import nwRegEx, nwUnicode
|
|
||||||
from novelwriter.common import checkInt
|
from novelwriter.common import checkInt
|
||||||
|
from novelwriter.constants import nwRegEx, nwUnicode
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ from PyQt5.QtWidgets import (
|
|||||||
QAction, QMenu, QFrame
|
QAction, QMenu, QFrame
|
||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.core import ToHtml
|
|
||||||
from novelwriter.enum import nwItemType, nwDocAction, nwDocMode
|
from novelwriter.enum import nwItemType, nwDocAction, nwDocMode
|
||||||
from novelwriter.error import logException
|
from novelwriter.error import logException
|
||||||
from novelwriter.constants import nwUnicode
|
from novelwriter.constants import nwUnicode
|
||||||
|
from novelwriter.core.tohtml import ToHtml
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -39,10 +39,13 @@ from PyQt5.QtWidgets import (
|
|||||||
QVBoxLayout, QWidget
|
QVBoxLayout, QWidget
|
||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.core import DocMerger, DocSplitter
|
|
||||||
from novelwriter.enum import nwDocMode, nwItemType, nwItemClass, nwItemLayout, nwAlert
|
from novelwriter.enum import nwDocMode, nwItemType, nwItemClass, nwItemLayout, nwAlert
|
||||||
from novelwriter.dialogs import GuiDocMerge, GuiDocSplit, GuiEditLabel, GuiProjectSettings
|
|
||||||
from novelwriter.constants import nwHeaders, nwUnicode, trConst, nwLabels
|
from novelwriter.constants import nwHeaders, nwUnicode, trConst, nwLabels
|
||||||
|
from novelwriter.core.coretools import DocMerger, DocSplitter
|
||||||
|
from novelwriter.dialogs.docmerge import GuiDocMerge
|
||||||
|
from novelwriter.dialogs.docsplit import GuiDocSplit
|
||||||
|
from novelwriter.dialogs.editlabel import GuiEditLabel
|
||||||
|
from novelwriter.dialogs.projsettings import GuiProjectSettings
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
+24
-13
@@ -38,19 +38,30 @@ from PyQt5.QtWidgets import (
|
|||||||
QMessageBox, QDialog, QStackedWidget
|
QMessageBox, QDialog, QStackedWidget
|
||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.gui import (
|
from novelwriter.gui.theme import GuiTheme
|
||||||
GuiDocEditor, GuiDocViewDetails, GuiDocViewer, GuiItemDetails, GuiMainMenu,
|
from novelwriter.gui.sidebar import GuiSideBar
|
||||||
GuiMainStatus, GuiNovelView, GuiOutlineView, GuiProjectView, GuiTheme,
|
from novelwriter.gui.outline import GuiOutlineView
|
||||||
GuiSideBar
|
from novelwriter.gui.mainmenu import GuiMainMenu
|
||||||
)
|
from novelwriter.gui.projtree import GuiProjectView
|
||||||
from novelwriter.dialogs import (
|
from novelwriter.gui.doceditor import GuiDocEditor
|
||||||
GuiAbout, GuiPreferences, GuiProjectDetails, GuiProjectLoad,
|
from novelwriter.gui.docviewer import GuiDocViewDetails, GuiDocViewer
|
||||||
GuiProjectSettings, GuiUpdates, GuiWordList
|
from novelwriter.gui.noveltree import GuiNovelView
|
||||||
)
|
from novelwriter.gui.statusbar import GuiMainStatus
|
||||||
from novelwriter.tools import (
|
from novelwriter.gui.itemdetails import GuiItemDetails
|
||||||
GuiBuildNovel, GuiLipsum, GuiProjectWizard, GuiWritingStats
|
from novelwriter.dialogs.about import GuiAbout
|
||||||
)
|
from novelwriter.dialogs.updates import GuiUpdates
|
||||||
from novelwriter.core import NWProject, ProjectBuilder
|
from novelwriter.dialogs.projload import GuiProjectLoad
|
||||||
|
from novelwriter.dialogs.wordlist import GuiWordList
|
||||||
|
from novelwriter.dialogs.preferences import GuiPreferences
|
||||||
|
from novelwriter.dialogs.projdetails import GuiProjectDetails
|
||||||
|
from novelwriter.dialogs.projsettings import GuiProjectSettings
|
||||||
|
from novelwriter.tools.build import GuiBuildNovel
|
||||||
|
from novelwriter.tools.lipsum import GuiLipsum
|
||||||
|
from novelwriter.tools.projwizard import GuiProjectWizard
|
||||||
|
from novelwriter.tools.writingstats import GuiWritingStats
|
||||||
|
from novelwriter.core.project import NWProject
|
||||||
|
from novelwriter.core.coretools import ProjectBuilder
|
||||||
|
|
||||||
from novelwriter.enum import (
|
from novelwriter.enum import (
|
||||||
nwDocMode, nwItemType, nwItemClass, nwAlert, nwWidget, nwView
|
nwDocMode, nwItemType, nwItemClass, nwAlert, nwWidget, nwView
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
"""
|
|
||||||
novelWriter – Tools Init
|
|
||||||
========================
|
|
||||||
|
|
||||||
This file is a part of novelWriter
|
|
||||||
Copyright 2018–2022, Veronica Berglyd Olsen
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from novelwriter.tools.build import GuiBuildNovel
|
|
||||||
from novelwriter.tools.lipsum import GuiLipsum
|
|
||||||
from novelwriter.tools.projwizard import GuiProjectWizard
|
|
||||||
from novelwriter.tools.writingstats import GuiWritingStats
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"GuiBuildNovel",
|
|
||||||
"GuiLipsum",
|
|
||||||
"GuiProjectWizard",
|
|
||||||
"GuiWritingStats",
|
|
||||||
]
|
|
||||||
@@ -43,12 +43,14 @@ from PyQt5.QtWidgets import (
|
|||||||
)
|
)
|
||||||
from PyQt5.QtPrintSupport import QPrinter, QPrintPreviewDialog
|
from PyQt5.QtPrintSupport import QPrinter, QPrintPreviewDialog
|
||||||
|
|
||||||
from novelwriter.core import ToHtml, ToOdt, ToMarkdown
|
|
||||||
from novelwriter.enum import nwAlert, nwItemType, nwItemLayout, nwItemClass
|
from novelwriter.enum import nwAlert, nwItemType, nwItemLayout, nwItemClass
|
||||||
from novelwriter.error import formatException, logException
|
from novelwriter.error import formatException, logException
|
||||||
from novelwriter.common import fuzzyTime, makeFileNameSafe
|
from novelwriter.common import fuzzyTime, makeFileNameSafe
|
||||||
from novelwriter.custom import QSwitch
|
from novelwriter.custom import QSwitch
|
||||||
from novelwriter.constants import nwConst, nwFiles
|
from novelwriter.constants import nwConst, nwFiles
|
||||||
|
from novelwriter.core.tomd import ToMarkdown
|
||||||
|
from novelwriter.core.toodt import ToOdt
|
||||||
|
from novelwriter.core.tohtml import ToHtml
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ from PyQt5.QtGui import QIcon
|
|||||||
|
|
||||||
from tools import C, buildTestProject
|
from tools import C, buildTestProject
|
||||||
|
|
||||||
|
from novelwriter.enum import nwItemClass, nwItemType, nwItemLayout
|
||||||
from novelwriter.core.item import NWItem
|
from novelwriter.core.item import NWItem
|
||||||
from novelwriter.core.project import NWProject
|
from novelwriter.core.project import NWProject
|
||||||
from novelwriter.enum import nwItemClass, nwItemType, nwItemLayout
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.core
|
@pytest.mark.core
|
||||||
|
|||||||
@@ -31,13 +31,15 @@ from PyQt5.QtCore import Qt
|
|||||||
from PyQt5.QtWidgets import QDialog, QMessageBox, QInputDialog
|
from PyQt5.QtWidgets import QDialog, QMessageBox, QInputDialog
|
||||||
|
|
||||||
from novelwriter.enum import nwItemType, nwView, nwWidget
|
from novelwriter.enum import nwItemType, nwView, nwWidget
|
||||||
from novelwriter.tools import GuiProjectWizard
|
|
||||||
from novelwriter.dialogs import GuiEditLabel, GuiAbout, GuiProjectLoad
|
|
||||||
from novelwriter.constants import nwFiles
|
from novelwriter.constants import nwFiles
|
||||||
from novelwriter.gui.outline import GuiOutlineView
|
from novelwriter.gui.outline import GuiOutlineView
|
||||||
from novelwriter.gui.projtree import GuiProjectTree
|
from novelwriter.gui.projtree import GuiProjectTree
|
||||||
from novelwriter.gui.doceditor import GuiDocEditor
|
from novelwriter.gui.doceditor import GuiDocEditor
|
||||||
from novelwriter.gui.noveltree import GuiNovelView
|
from novelwriter.gui.noveltree import GuiNovelView
|
||||||
|
from novelwriter.dialogs.about import GuiAbout
|
||||||
|
from novelwriter.dialogs.projload import GuiProjectLoad
|
||||||
|
from novelwriter.dialogs.editlabel import GuiEditLabel
|
||||||
|
from novelwriter.tools.projwizard import GuiProjectWizard
|
||||||
|
|
||||||
KEY_DELAY = 1
|
KEY_DELAY = 1
|
||||||
|
|
||||||
|
|||||||
@@ -26,14 +26,14 @@ from pathlib import Path
|
|||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
|
|
||||||
from mock import causeOSError
|
from mock import causeOSError
|
||||||
from novelwriter.constants import nwLabels
|
|
||||||
from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType
|
|
||||||
from tools import writeFile
|
from tools import writeFile
|
||||||
|
|
||||||
from PyQt5.QtGui import QIcon, QPalette, QPixmap
|
from PyQt5.QtGui import QIcon, QPalette, QPixmap
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
|
|
||||||
|
from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType
|
||||||
from novelwriter.config import Config
|
from novelwriter.config import Config
|
||||||
|
from novelwriter.constants import nwLabels
|
||||||
from novelwriter.gui.theme import GuiIcons, GuiTheme
|
from novelwriter.gui.theme import GuiIcons, GuiTheme
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ from tools import cmpFiles, getGuiItem
|
|||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtWidgets import QAction, QFileDialog
|
from PyQt5.QtWidgets import QAction, QFileDialog
|
||||||
|
|
||||||
from novelwriter.tools import GuiBuildNovel
|
from novelwriter.tools.build import GuiBuildNovel
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gui
|
@pytest.mark.gui
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ from tools import C, getGuiItem, buildTestProject
|
|||||||
|
|
||||||
from PyQt5.QtWidgets import QAction
|
from PyQt5.QtWidgets import QAction
|
||||||
|
|
||||||
from novelwriter.tools import GuiLipsum
|
from novelwriter.tools.lipsum import GuiLipsum
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gui
|
@pytest.mark.gui
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ from tools import getGuiItem, writeFile, buildTestProject
|
|||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtWidgets import QAction, QFileDialog
|
from PyQt5.QtWidgets import QAction, QFileDialog
|
||||||
|
|
||||||
from novelwriter.tools import GuiWritingStats
|
|
||||||
from novelwriter.constants import nwFiles
|
from novelwriter.constants import nwFiles
|
||||||
|
from novelwriter.tools.writingstats import GuiWritingStats
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.gui
|
@pytest.mark.gui
|
||||||
|
|||||||
+1
-1
@@ -158,7 +158,7 @@ def buildTestProject(theObject, projPath):
|
|||||||
object as the parent.
|
object as the parent.
|
||||||
"""
|
"""
|
||||||
from novelwriter.enum import nwItemClass
|
from novelwriter.enum import nwItemClass
|
||||||
from novelwriter.core import NWProject
|
from novelwriter.core.project import NWProject
|
||||||
|
|
||||||
if isinstance(theObject, NWProject):
|
if isinstance(theObject, NWProject):
|
||||||
theGUI = None
|
theGUI = None
|
||||||
|
|||||||
Reference in New Issue
Block a user