Cleanup of unused imports

This commit is contained in:
Veronica K. B. Olsen
2020-08-08 20:55:45 +02:00
parent a47c212b79
commit a9b6e00ba7
12 changed files with 16 additions and 17 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
""" """
from nw.constants.enum import nwItemClass, nwItemLayout, nwOutline, nwDocInsert from nw.constants.enum import nwItemClass, nwItemLayout, nwOutline
class nwConst(): class nwConst():
+1 -1
View File
@@ -28,7 +28,7 @@
import logging import logging
import nw import nw
from os import path, mkdir, rename, unlink from os import path, rename, unlink
from nw.core.item import NWItem from nw.core.item import NWItem
from nw.constants import nwAlert from nw.constants import nwAlert
-2
View File
@@ -30,8 +30,6 @@
import logging import logging
import nw import nw
from os import path, unlink, rmdir
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# =============================================================================================== # # =============================================================================================== #
+2 -2
View File
@@ -76,9 +76,9 @@ def exceptionHandler(exType, exValue, exTrace):
"""Function to catch unhandled global exceptions. """Function to catch unhandled global exceptions.
""" """
import logging import logging
from traceback import print_tb, format_tb from traceback import print_tb
from nw import CONFIG from nw import CONFIG
from PyQt5.QtWidgets import qApp, QApplication, QErrorMessage, QMessageBox from PyQt5.QtWidgets import qApp, QErrorMessage
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
logger.error("%s: %s" % (exType.__name__, str(exValue))) logger.error("%s: %s" % (exType.__name__, str(exValue)))
+1 -1
View File
@@ -39,7 +39,7 @@ from PyQt5.QtCore import (
Qt, QSize, QThread, QTimer, pyqtSlot, QRegExp, QRegularExpression Qt, QSize, QThread, QTimer, pyqtSlot, QRegExp, QRegularExpression
) )
from PyQt5.QtGui import ( from PyQt5.QtGui import (
QTextCursor, QTextOption, QKeySequence, QFont, QColor, QPalette, QIcon, QTextCursor, QTextOption, QKeySequence, QFont, QColor, QPalette,
QTextDocument, QCursor, QPixmap QTextDocument, QCursor, QPixmap
) )
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
+1
View File
@@ -33,6 +33,7 @@ from PyQt5.QtWidgets import (
QDialog, QVBoxLayout, QComboBox, QListWidget, QAbstractItemView, QDialog, QVBoxLayout, QComboBox, QListWidget, QAbstractItemView,
QListWidgetItem, QDialogButtonBox, QLabel QListWidgetItem, QDialogButtonBox, QLabel
) )
from nw.constants import nwAlert, nwItemType, nwItemClass, nwItemLayout from nw.constants import nwAlert, nwItemType, nwItemClass, nwItemLayout
from nw.gui.custom import QHelpLabel from nw.gui.custom import QHelpLabel
from nw.core import NWDoc from nw.core import NWDoc
+2 -2
View File
@@ -29,11 +29,11 @@ import logging
import nw import nw
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont, QIcon, QPixmap from PyQt5.QtGui import QFont, QPixmap
from PyQt5.QtWidgets import QWidget, QGridLayout, QLabel from PyQt5.QtWidgets import QWidget, QGridLayout, QLabel
from nw.constants import ( from nw.constants import (
nwLabels, nwItemClass, nwItemType, nwItemLayout, nwUnicode nwLabels, nwItemClass, nwItemType, nwItemLayout
) )
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
-1
View File
@@ -28,7 +28,6 @@
import logging import logging
import nw import nw
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QDialog, QVBoxLayout, QGridLayout, QLineEdit, QComboBox, QLabel, QDialog, QVBoxLayout, QGridLayout, QLineEdit, QComboBox, QLabel,
QDialogButtonBox QDialogButtonBox
+2 -1
View File
@@ -30,7 +30,8 @@ import nw
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QScrollArea, QWidget, QGridLayout, QHBoxLayout, QGroupBox, QLabel, QSizePolicy QScrollArea, QWidget, QGridLayout, QHBoxLayout, QGroupBox, QLabel,
QSizePolicy
) )
from nw.constants import nwLabels, nwKeyWords from nw.constants import nwLabels, nwKeyWords
+3 -3
View File
@@ -30,15 +30,15 @@ import logging
import nw import nw
from PyQt5.QtCore import Qt, QSize from PyQt5.QtCore import Qt, QSize
from PyQt5.QtGui import QFont, QColor, QIcon from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
qApp, QTreeWidget, QTreeWidgetItem, QAbstractItemView, QMessageBox, qApp, QTreeWidget, QTreeWidgetItem, QAbstractItemView, QMessageBox,
QHeaderView, QMenu, QAction QMenu, QAction
) )
from nw.core import NWDoc from nw.core import NWDoc
from nw.constants import ( from nw.constants import (
nwLabels, nwItemType, nwItemClass, nwItemLayout, nwAlert, nwUnicode nwLabels, nwItemType, nwItemClass, nwItemLayout, nwAlert
) )
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
+2 -2
View File
@@ -30,8 +30,8 @@ import nw
from time import time from time import time
from PyQt5.QtCore import Qt, QTimer from PyQt5.QtCore import QTimer
from PyQt5.QtGui import QColor, QPixmap, QFont, QPainter from PyQt5.QtGui import QColor, QPainter
from PyQt5.QtWidgets import qApp, QStatusBar, QLabel, QAbstractButton from PyQt5.QtWidgets import qApp, QStatusBar, QLabel, QAbstractButton
from nw.core import NWSpellCheck from nw.core import NWSpellCheck
+1 -1
View File
@@ -46,7 +46,7 @@ from nw.gui import (
GuiProjectSettings, GuiProjectTree, GuiWritingStats, GuiAbout GuiProjectSettings, GuiProjectTree, GuiWritingStats, GuiAbout
) )
from nw.core import NWProject, NWDoc, NWIndex from nw.core import NWProject, NWDoc, NWIndex
from nw.constants import nwFiles, nwItemType, nwAlert from nw.constants import nwItemType, nwAlert
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)