Cleanup of unused imports
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
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():
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from os import path, mkdir, rename, unlink
|
||||
from os import path, rename, unlink
|
||||
|
||||
from nw.core.item import NWItem
|
||||
from nw.constants import nwAlert
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from os import path, unlink, rmdir
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# =============================================================================================== #
|
||||
|
||||
+2
-2
@@ -76,9 +76,9 @@ def exceptionHandler(exType, exValue, exTrace):
|
||||
"""Function to catch unhandled global exceptions.
|
||||
"""
|
||||
import logging
|
||||
from traceback import print_tb, format_tb
|
||||
from traceback import print_tb
|
||||
from nw import CONFIG
|
||||
from PyQt5.QtWidgets import qApp, QApplication, QErrorMessage, QMessageBox
|
||||
from PyQt5.QtWidgets import qApp, QErrorMessage
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.error("%s: %s" % (exType.__name__, str(exValue)))
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ from PyQt5.QtCore import (
|
||||
Qt, QSize, QThread, QTimer, pyqtSlot, QRegExp, QRegularExpression
|
||||
)
|
||||
from PyQt5.QtGui import (
|
||||
QTextCursor, QTextOption, QKeySequence, QFont, QColor, QPalette, QIcon,
|
||||
QTextCursor, QTextOption, QKeySequence, QFont, QColor, QPalette,
|
||||
QTextDocument, QCursor, QPixmap
|
||||
)
|
||||
from PyQt5.QtWidgets import (
|
||||
|
||||
@@ -33,6 +33,7 @@ from PyQt5.QtWidgets import (
|
||||
QDialog, QVBoxLayout, QComboBox, QListWidget, QAbstractItemView,
|
||||
QListWidgetItem, QDialogButtonBox, QLabel
|
||||
)
|
||||
|
||||
from nw.constants import nwAlert, nwItemType, nwItemClass, nwItemLayout
|
||||
from nw.gui.custom import QHelpLabel
|
||||
from nw.core import NWDoc
|
||||
|
||||
@@ -29,11 +29,11 @@ import logging
|
||||
import nw
|
||||
|
||||
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 nw.constants import (
|
||||
nwLabels, nwItemClass, nwItemType, nwItemLayout, nwUnicode
|
||||
nwLabels, nwItemClass, nwItemType, nwItemLayout
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import (
|
||||
QDialog, QVBoxLayout, QGridLayout, QLineEdit, QComboBox, QLabel,
|
||||
QDialogButtonBox
|
||||
|
||||
@@ -30,7 +30,8 @@ import nw
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import (
|
||||
QScrollArea, QWidget, QGridLayout, QHBoxLayout, QGroupBox, QLabel, QSizePolicy
|
||||
QScrollArea, QWidget, QGridLayout, QHBoxLayout, QGroupBox, QLabel,
|
||||
QSizePolicy
|
||||
)
|
||||
|
||||
from nw.constants import nwLabels, nwKeyWords
|
||||
|
||||
+3
-3
@@ -30,15 +30,15 @@ import logging
|
||||
import nw
|
||||
|
||||
from PyQt5.QtCore import Qt, QSize
|
||||
from PyQt5.QtGui import QFont, QColor, QIcon
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import (
|
||||
qApp, QTreeWidget, QTreeWidgetItem, QAbstractItemView, QMessageBox,
|
||||
QHeaderView, QMenu, QAction
|
||||
QMenu, QAction
|
||||
)
|
||||
|
||||
from nw.core import NWDoc
|
||||
from nw.constants import (
|
||||
nwLabels, nwItemType, nwItemClass, nwItemLayout, nwAlert, nwUnicode
|
||||
nwLabels, nwItemType, nwItemClass, nwItemLayout, nwAlert
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ import nw
|
||||
|
||||
from time import time
|
||||
|
||||
from PyQt5.QtCore import Qt, QTimer
|
||||
from PyQt5.QtGui import QColor, QPixmap, QFont, QPainter
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QColor, QPainter
|
||||
from PyQt5.QtWidgets import qApp, QStatusBar, QLabel, QAbstractButton
|
||||
|
||||
from nw.core import NWSpellCheck
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ from nw.gui import (
|
||||
GuiProjectSettings, GuiProjectTree, GuiWritingStats, GuiAbout
|
||||
)
|
||||
from nw.core import NWProject, NWDoc, NWIndex
|
||||
from nw.constants import nwFiles, nwItemType, nwAlert
|
||||
from nw.constants import nwItemType, nwAlert
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user