Use direct imports everywhere
This commit is contained in:
@@ -25,9 +25,9 @@ from PyQt5.QtGui import QIcon
|
||||
|
||||
from tools import C, buildTestProject
|
||||
|
||||
from novelwriter.enum import nwItemClass, nwItemType, nwItemLayout
|
||||
from novelwriter.core.item import NWItem
|
||||
from novelwriter.core.project import NWProject
|
||||
from novelwriter.enum import nwItemClass, nwItemType, nwItemLayout
|
||||
|
||||
|
||||
@pytest.mark.core
|
||||
|
||||
@@ -31,13 +31,15 @@ from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QDialog, QMessageBox, QInputDialog
|
||||
|
||||
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.gui.outline import GuiOutlineView
|
||||
from novelwriter.gui.projtree import GuiProjectTree
|
||||
from novelwriter.gui.doceditor import GuiDocEditor
|
||||
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
|
||||
|
||||
|
||||
@@ -26,14 +26,14 @@ from pathlib import Path
|
||||
from configparser import ConfigParser
|
||||
|
||||
from mock import causeOSError
|
||||
from novelwriter.constants import nwLabels
|
||||
from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType
|
||||
from tools import writeFile
|
||||
|
||||
from PyQt5.QtGui import QIcon, QPalette, QPixmap
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
|
||||
from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType
|
||||
from novelwriter.config import Config
|
||||
from novelwriter.constants import nwLabels
|
||||
from novelwriter.gui.theme import GuiIcons, GuiTheme
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ from tools import cmpFiles, getGuiItem
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QAction, QFileDialog
|
||||
|
||||
from novelwriter.tools import GuiBuildNovel
|
||||
from novelwriter.tools.build import GuiBuildNovel
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
||||
@@ -25,7 +25,7 @@ from tools import C, getGuiItem, buildTestProject
|
||||
|
||||
from PyQt5.QtWidgets import QAction
|
||||
|
||||
from novelwriter.tools import GuiLipsum
|
||||
from novelwriter.tools.lipsum import GuiLipsum
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
||||
@@ -28,8 +28,8 @@ from tools import getGuiItem, writeFile, buildTestProject
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QAction, QFileDialog
|
||||
|
||||
from novelwriter.tools import GuiWritingStats
|
||||
from novelwriter.constants import nwFiles
|
||||
from novelwriter.tools.writingstats import GuiWritingStats
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ def buildTestProject(theObject, projPath):
|
||||
object as the parent.
|
||||
"""
|
||||
from novelwriter.enum import nwItemClass
|
||||
from novelwriter.core import NWProject
|
||||
from novelwriter.core.project import NWProject
|
||||
|
||||
if isinstance(theObject, NWProject):
|
||||
theGUI = None
|
||||
|
||||
Reference in New Issue
Block a user