Remove unused imports

This commit is contained in:
Veronica K. B. Olsen
2019-11-09 21:01:43 +01:00
parent b778cab875
commit 154e91ede8
25 changed files with 33 additions and 53 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ import configparser
import sys import sys
import nw import nw
from os import path, mkdir, makedirs, getcwd from os import path, mkdir, makedirs
from appdirs import user_config_dir from appdirs import user_config_dir
from datetime import datetime from datetime import datetime
+1 -3
View File
@@ -15,11 +15,9 @@ import nw
from os import path from os import path
from PyQt5.QtWidgets import QMessageBox
from nw.convert.file.text import TextFile from nw.convert.file.text import TextFile
from nw.convert.tokenizer import Tokenizer from nw.convert.tokenizer import Tokenizer
from nw.constants import nwAlert, nwItemLayout from nw.constants import nwAlert
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
-1
View File
@@ -10,7 +10,6 @@
""" """
import textwrap
import logging import logging
import re import re
import nw import nw
+4 -7
View File
@@ -16,14 +16,11 @@ import nw
from os import path from os import path
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtGui import ( from PyQt5.QtGui import QFont
QIcon, QPixmap, QColor, QBrush, QStandardItemModel, QFont
)
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QDialog, QHBoxLayout, QVBoxLayout, QFormLayout, QLineEdit, QPlainTextEdit, QDialog, QHBoxLayout, QVBoxLayout, QLineEdit, QLabel, QWidget, QTabWidget,
QLabel, QWidget, QTabWidget, QDialogButtonBox, QSpinBox, QGroupBox, QDialogButtonBox, QSpinBox, QGroupBox, QComboBox, QMessageBox, QCheckBox,
QComboBox, QMessageBox, QCheckBox, QGridLayout, QFontComboBox, QPushButton, QGridLayout, QFontComboBox, QPushButton, QFileDialog
QFileDialog
) )
from nw.tools import NWSpellCheck, NWSpellSimple, NWSpellEnchant from nw.tools import NWSpellCheck, NWSpellSimple, NWSpellEnchant
+1 -2
View File
@@ -24,8 +24,7 @@ from PyQt5.QtWidgets import (
) )
from nw.convert import TextFile, HtmlFile, MarkdownFile, LaTeXFile, ConcatFile from nw.convert import TextFile, HtmlFile, MarkdownFile, LaTeXFile, ConcatFile
from nw.project import NWDoc from nw.tools import OptLastState
from nw.tools import numberToWord, OptLastState
from nw.common import packageRefURL from nw.common import packageRefURL
from nw.constants import nwFiles, nwItemType, nwAlert from nw.constants import nwFiles, nwItemType, nwAlert
+2 -2
View File
@@ -17,8 +17,8 @@ from os import path
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QDialog, QHBoxLayout, QVBoxLayout, QGroupBox, QFormLayout, QDialog, QHBoxLayout, QVBoxLayout, QGroupBox, QFormLayout, QLineEdit,
QLineEdit, QPushButton, QComboBox QPushButton, QComboBox
) )
from nw.constants import nwLabels, nwItemLayout, nwItemClass, nwItemType from nw.constants import nwLabels, nwItemLayout, nwItemClass, nwItemType
+3 -3
View File
@@ -19,9 +19,9 @@ from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon, QPixmap, QColor, QBrush from PyQt5.QtGui import QIcon, QPixmap, QColor, QBrush
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QDialog, QHBoxLayout, QVBoxLayout, QFormLayout, QLineEdit, QPlainTextEdit, QDialog, QHBoxLayout, QVBoxLayout, QFormLayout, QLineEdit, QPlainTextEdit,
QLabel, QWidget, QTabWidget, QDialogButtonBox, QListWidget, QLabel, QWidget, QTabWidget, QDialogButtonBox, QListWidget, QPushButton,
QListWidgetItem, QPushButton, QColorDialog, QAbstractItemView, QTreeWidget, QListWidgetItem, QColorDialog, QAbstractItemView, QTreeWidget, QCheckBox,
QTreeWidgetItem, QCheckBox QTreeWidgetItem
) )
from nw.constants import nwAlert from nw.constants import nwAlert
+3 -4
View File
@@ -17,11 +17,10 @@ from os import path
from datetime import datetime from datetime import datetime
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon, QColor, QPixmap, QFont from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QDialog, QVBoxLayout, QHBoxLayout, QTreeWidget, QTreeWidgetItem, QDialog, QHBoxLayout, QTreeWidget, QTreeWidgetItem, QDialogButtonBox,
QDialogButtonBox, QHeaderView, QGridLayout, QLabel, QGroupBox, QGridLayout, QLabel, QGroupBox, QCheckBox
QCheckBox
) )
from nw.constants import nwConst, nwFiles, nwAlert from nw.constants import nwConst, nwFiles, nwAlert
+4 -4
View File
@@ -16,11 +16,11 @@ import nw
from os import path from os import path
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon, QColor, QPixmap from PyQt5.QtGui import QColor, QPixmap
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QDialog, QVBoxLayout, QHBoxLayout, QTableWidget, QTableWidgetItem, QDialog, QVBoxLayout, QHBoxLayout, QTableWidget, QTableWidgetItem, QLabel,
QDialogButtonBox, QLabel, QPushButton, QHeaderView, QGridLayout, QDialogButtonBox, QPushButton, QHeaderView, QGridLayout, QGroupBox,
QGroupBox, QCheckBox QCheckBox
) )
from nw.constants import nwFiles, nwItemClass from nw.constants import nwFiles, nwItemClass
+3 -3
View File
@@ -15,13 +15,13 @@ import nw
from time import time from time import time
from PyQt5.QtCore import Qt, QTimer, QSizeF from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
qApp, QTextEdit, QAction, QMenu, QShortcut, QMessageBox qApp, QTextEdit, QAction, QMenu, QShortcut, QMessageBox
) )
from PyQt5.QtGui import ( from PyQt5.QtGui import (
QTextCursor, QTextOption, QIcon, QKeySequence, QFont, QColor, QTextCursor, QTextOption, QKeySequence, QFont, QColor, QPalette,
QPalette, QTextDocument QTextDocument
) )
from nw.project import NWDoc from nw.project import NWDoc
+1 -1
View File
@@ -14,7 +14,7 @@ import logging
import nw import nw
from PyQt5.QtCore import Qt, QSize from PyQt5.QtCore import Qt, QSize
from PyQt5.QtGui import QIcon, QFont, QColor from PyQt5.QtGui import QFont, QColor
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QTreeWidget, QTreeWidgetItem, QAbstractItemView, QApplication QTreeWidget, QTreeWidgetItem, QAbstractItemView, QApplication
) )
+1 -1
View File
@@ -17,7 +17,7 @@ from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QTextBrowser from PyQt5.QtWidgets import QTextBrowser
from PyQt5.QtGui import QTextOption, QFont, QPalette, QColor from PyQt5.QtGui import QTextOption, QFont, QPalette, QColor
from nw.convert import Tokenizer, ToHtml from nw.convert import ToHtml
from nw.constants import nwAlert, nwItemType from nw.constants import nwAlert, nwItemType
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
-2
View File
@@ -13,8 +13,6 @@
import logging import logging
import nw import nw
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPalette, QColor
from PyQt5.QtWidgets import QFrame, QHBoxLayout, QLabel, QPushButton from PyQt5.QtWidgets import QFrame, QHBoxLayout, QLabel, QPushButton
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
-1
View File
@@ -14,7 +14,6 @@ import logging
import nw import nw
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QFrame, QGridLayout, QLabel, QLineEdit, QPushButton, QApplication QFrame, QGridLayout, QLabel, QLineEdit, QPushButton, QApplication
) )
+1 -3
View File
@@ -14,10 +14,8 @@ import logging
import nw import nw
from PyQt5.QtCore import Qt, QSize from PyQt5.QtCore import Qt, QSize
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QWidget, QHBoxLayout, QVBoxLayout, QLabel, QGroupBox, QScrollArea, QFrame, QWidget, QLabel, QScrollArea, QFrame, QToolButton, QCheckBox, QGridLayout
QToolButton, QSizePolicy, QCheckBox, QGridLayout
) )
from nw.constants import nwLabels from nw.constants import nwLabels
+1 -1
View File
@@ -14,7 +14,7 @@ import logging
import nw import nw
from PyQt5.QtCore import QUrl from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QIcon, QDesktopServices from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QMenuBar, QAction, QMessageBox from PyQt5.QtWidgets import QMenuBar, QAction, QMessageBox
from nw.constants import nwItemType, nwItemClass, nwDocAction from nw.constants import nwItemType, nwItemClass, nwDocAction
+2 -2
View File
@@ -16,8 +16,8 @@ import nw
from time import time from time import time
from PyQt5.QtCore import Qt, QTimer from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QIcon, QColor, QPixmap, QFont from PyQt5.QtGui import QColor, QPixmap, QFont
from PyQt5.QtWidgets import QStatusBar, QLabel, QFrame from PyQt5.QtWidgets import QStatusBar, QLabel
from nw.tools import NWSpellCheck from nw.tools import NWSpellCheck
+1 -1
View File
@@ -17,7 +17,7 @@ import nw
from os import path, listdir from os import path, listdir
from PyQt5.QtWidgets import qApp from PyQt5.QtWidgets import qApp
from PyQt5.QtGui import QPalette, QColor, QIcon, QPixmap from PyQt5.QtGui import QPalette, QColor, QIcon
from nw.constants import nwAlert from nw.constants import nwAlert
from nw.gui.icons import GuiIcons from nw.gui.icons import GuiIcons
-2
View File
@@ -18,8 +18,6 @@ from PyQt5.QtGui import (
QColor, QTextCharFormat, QFont, QSyntaxHighlighter, QBrush QColor, QTextCharFormat, QFont, QSyntaxHighlighter, QBrush
) )
from nw.constants import nwUnicode
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class GuiDocHighlighter(QSyntaxHighlighter): class GuiDocHighlighter(QSyntaxHighlighter):
+2 -2
View File
@@ -19,8 +19,8 @@ from os import path
from PyQt5.QtCore import Qt, QTimer from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QIcon, QPixmap, QColor from PyQt5.QtGui import QIcon, QPixmap, QColor
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
qApp, QWidget, QMainWindow, QVBoxLayout, QFrame, QSplitter, QFileDialog, qApp, QMainWindow, QVBoxLayout, QFrame, QSplitter, QFileDialog, QShortcut,
QShortcut, QMessageBox, QProgressDialog, QDialog QMessageBox, QProgressDialog, QDialog
) )
from nw.gui import ( from nw.gui import (
+1 -1
View File
@@ -13,7 +13,7 @@
import logging import logging
import nw import nw
from os import path, mkdir, listdir from os import path
from shutil import make_archive from shutil import make_archive
from datetime import datetime from datetime import datetime
+1 -2
View File
@@ -16,9 +16,8 @@ import nw
from os import path from os import path
from nw.project.document import NWDoc
from nw.constants import ( from nw.constants import (
nwFiles, nwKeyWords, nwItemType, nwItemClass, nwItemLayout, nwAlert nwFiles, nwKeyWords, nwItemType, nwItemClass, nwAlert
) )
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
-1
View File
@@ -13,7 +13,6 @@
import logging import logging
import nw import nw
from os import path, mkdir
from lxml import etree from lxml import etree
from datetime import datetime from datetime import datetime
-1
View File
@@ -16,7 +16,6 @@ import nw
from lxml import etree from lxml import etree
from nw.common import checkInt from nw.common import checkInt
from nw.constants import nwItemClass
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
-2
View File
@@ -13,8 +13,6 @@
import logging import logging
import nw import nw
from os import path
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
def numberToWord(numVal, theLanguage): def numberToWord(numVal, theLanguage):