Use direct imports everywhere

This commit is contained in:
Veronica Berglyd Olsen
2022-11-28 18:23:36 +01:00
parent a51f0db6fa
commit 32d75567e3
20 changed files with 50 additions and 196 deletions
-45
View File
@@ -1,45 +0,0 @@
"""
novelWriter GUI Init
======================
This file is a part of novelWriter
Copyright 20182022, 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",
]
+2 -1
View File
@@ -50,10 +50,11 @@ from PyQt5.QtWidgets import (
QFrame
)
from novelwriter.core import NWSpellEnchant, countWords
from novelwriter.enum import nwAlert, nwDocAction, nwDocInsert, nwDocMode, nwItemClass
from novelwriter.common import minmax, transferCase
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
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -33,8 +33,8 @@ from PyQt5.QtGui import (
QColor, QTextCharFormat, QFont, QSyntaxHighlighter, QBrush
)
from novelwriter.constants import nwRegEx, nwUnicode
from novelwriter.common import checkInt
from novelwriter.constants import nwRegEx, nwUnicode
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -41,10 +41,10 @@ from PyQt5.QtWidgets import (
QAction, QMenu, QFrame
)
from novelwriter.core import ToHtml
from novelwriter.enum import nwItemType, nwDocAction, nwDocMode
from novelwriter.error import logException
from novelwriter.constants import nwUnicode
from novelwriter.core.tohtml import ToHtml
logger = logging.getLogger(__name__)
+5 -2
View File
@@ -39,10 +39,13 @@ from PyQt5.QtWidgets import (
QVBoxLayout, QWidget
)
from novelwriter.core import DocMerger, DocSplitter
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.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__)