Further PEP8 compliance changes
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from PyQt5.QtGui import QFont
|
||||
from PyQt5.QtGui import QFont
|
||||
from PyQt5.QtWidgets import QFrame, QGridLayout, QLabel
|
||||
|
||||
from nw.constants import nwLabels
|
||||
from nw.constants import nwLabels
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -15,18 +15,21 @@ import nw
|
||||
|
||||
from time import time
|
||||
|
||||
from PyQt5.QtCore import Qt, QTimer, QSizeF
|
||||
from PyQt5.QtWidgets import qApp, QTextEdit, QAction, QMenu, QShortcut, QMessageBox
|
||||
from PyQt5.QtGui import (
|
||||
QTextCursor, QTextOption, QIcon, QKeySequence, QFont, QColor, QPalette, QTextDocument,
|
||||
from PyQt5.QtCore import Qt, QTimer, QSizeF
|
||||
from PyQt5.QtWidgets import (
|
||||
qApp, QTextEdit, QAction, QMenu, QShortcut, QMessageBox
|
||||
)
|
||||
from PyQt5.QtGui import (
|
||||
QTextCursor, QTextOption, QIcon, QKeySequence, QFont, QColor,
|
||||
QPalette, QTextDocument,
|
||||
)
|
||||
|
||||
from nw.project.document import NWDoc
|
||||
from nw.project.document import NWDoc
|
||||
from nw.gui.tools.dochighlight import GuiDocHighlighter
|
||||
from nw.gui.tools.wordcounter import WordCounter
|
||||
from nw.tools.spellcheck import NWSpellCheck
|
||||
from nw.constants import nwFiles, nwUnicode
|
||||
from nw.enum import nwDocAction, nwAlert
|
||||
from nw.gui.tools.wordcounter import WordCounter
|
||||
from nw.tools.spellcheck import NWSpellCheck
|
||||
from nw.constants import nwFiles, nwUnicode
|
||||
from nw.enum import nwDocAction, nwAlert
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -85,20 +88,20 @@ class GuiDocEditor(QTextEdit):
|
||||
QShortcut(
|
||||
QKeySequence("Ctrl+."),
|
||||
self,
|
||||
context = Qt.WidgetShortcut,
|
||||
activated = self._openSpellContext
|
||||
context=Qt.WidgetShortcut,
|
||||
activated=self._openSpellContext
|
||||
)
|
||||
QShortcut(
|
||||
Qt.Key_Return | Qt.ControlModifier,
|
||||
self,
|
||||
context = Qt.WidgetShortcut,
|
||||
activated = self._followTag
|
||||
context=Qt.WidgetShortcut,
|
||||
activated=self._followTag
|
||||
)
|
||||
QShortcut(
|
||||
Qt.Key_Enter | Qt.ControlModifier,
|
||||
self,
|
||||
context = Qt.WidgetShortcut,
|
||||
activated = self._followTag
|
||||
context=Qt.WidgetShortcut,
|
||||
activated=self._followTag
|
||||
)
|
||||
|
||||
# Set Up Word Count Thread and Timer
|
||||
@@ -684,7 +687,7 @@ class GuiDocEditor(QTextEdit):
|
||||
the document. Wraps back to the top if not found.
|
||||
"""
|
||||
searchFor = self.theParent.searchBar.getSearchText()
|
||||
wasFound = self.find(searchFor)
|
||||
wasFound = self.find(searchFor)
|
||||
if not wasFound:
|
||||
theCursor = self.textCursor()
|
||||
theCursor.movePosition(QTextCursor.Start)
|
||||
|
||||
@@ -13,13 +13,15 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from PyQt5.QtCore import Qt, QSize
|
||||
from PyQt5.QtGui import QIcon, QFont, QColor
|
||||
from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QAbstractItemView, QApplication
|
||||
from PyQt5.QtCore import Qt, QSize
|
||||
from PyQt5.QtGui import QIcon, QFont, QColor
|
||||
from PyQt5.QtWidgets import (
|
||||
QTreeWidget, QTreeWidgetItem, QAbstractItemView, QApplication
|
||||
)
|
||||
|
||||
from nw.project.item import NWItem
|
||||
from nw.constants import nwLabels
|
||||
from nw.enum import nwItemType, nwItemClass, nwItemLayout, nwAlert
|
||||
from nw.constants import nwLabels
|
||||
from nw.enum import nwItemType, nwItemClass, nwItemLayout, nwAlert
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QTextBrowser
|
||||
from PyQt5.QtGui import QTextOption, QFont, QPalette, QColor
|
||||
from PyQt5.QtGui import QTextOption, QFont, QPalette, QColor
|
||||
|
||||
from nw.convert.tokenizer import Tokenizer
|
||||
from nw.convert.tokenizer import Tokenizer
|
||||
from nw.convert.text.tohtml import ToHtml
|
||||
from nw.enum import nwAlert, nwItemType
|
||||
from nw.enum import nwAlert, nwItemType
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QPalette, QColor
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QPalette, QColor
|
||||
from PyQt5.QtWidgets import QFrame, QHBoxLayout, QLabel, QPushButton
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -36,7 +36,8 @@ class GuiNoticeBar(QFrame):
|
||||
self.mainBox = QHBoxLayout(self)
|
||||
self.mainBox.setContentsMargins(8,2,2,2)
|
||||
|
||||
self.noteLabel = QLabel("Hi there!")
|
||||
self.noteLabel = QLabel("Hi there!")
|
||||
|
||||
self.closeButton = QPushButton(self.theTheme.getIcon("close"),"")
|
||||
self.closeButton.clicked.connect(self.hideNote)
|
||||
|
||||
|
||||
@@ -13,9 +13,11 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QFrame, QGridLayout, QLabel, QLineEdit, QPushButton, QApplication
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import (
|
||||
QFrame, QGridLayout, QLabel, QLineEdit, QPushButton, QApplication
|
||||
)
|
||||
|
||||
from nw.enum import nwDocAction
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
import logging
|
||||
import nw
|
||||
|
||||
from PyQt5.QtCore import Qt, QSize
|
||||
from PyQt5.QtGui import QFont
|
||||
from PyQt5.QtCore import Qt, QSize
|
||||
from PyQt5.QtGui import QFont
|
||||
from PyQt5.QtWidgets import (
|
||||
QWidget, QHBoxLayout, QVBoxLayout, QLabel, QGroupBox, QScrollArea, QFrame, QToolButton,
|
||||
QSizePolicy, QCheckBox, QGridLayout
|
||||
QWidget, QHBoxLayout, QVBoxLayout, QLabel, QGroupBox, QScrollArea, QFrame,
|
||||
QToolButton, QSizePolicy, QCheckBox, QGridLayout
|
||||
)
|
||||
|
||||
from nw.constants import nwLabels
|
||||
|
||||
Reference in New Issue
Block a user