Mon, 23 Sep 2019 19:10:42 +0200
Continued to resolve code style issue M841.
--- a/eric6/Plugins/ViewManagerPlugins/Listspace/Listspace.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/ViewManagerPlugins/Listspace/Listspace.py Mon Sep 23 19:10:42 2019 +0200 @@ -11,8 +11,10 @@ import os from PyQt5.QtCore import pyqtSignal, pyqtSlot, QFileInfo, QEvent, Qt -from PyQt5.QtWidgets import QStackedWidget, QSplitter, QListWidget, \ - QListWidgetItem, QSizePolicy, QMenu, QApplication +from PyQt5.QtWidgets import ( + QStackedWidget, QSplitter, QListWidget, QListWidgetItem, QSizePolicy, + QMenu, QApplication +) from ViewManager.ViewManager import ViewManager @@ -791,8 +793,10 @@ Private method to close the other editors. """ index = self.contextMenuIndex - for i in list(range(self.viewlist.count() - 1, index, -1)) + \ - list(range(index - 1, -1, -1)): + for i in ( + list(range(self.viewlist.count() - 1, index, -1)) + + list(range(index - 1, -1, -1)) + ): editor = self.editors[i] self.closeEditorWindow(editor) @@ -895,8 +899,10 @@ @return flag indicating, if we handled the event @rtype bool """ - if event.type() == QEvent.MouseButtonPress and \ - not event.button() == Qt.RightButton: + if ( + event.type() == QEvent.MouseButtonPress and + not event.button() == Qt.RightButton + ): switched = True if isinstance(watched, QStackedWidget): switched = watched is not self.currentStack
--- a/eric6/Plugins/ViewManagerPlugins/Tabview/Tabview.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/ViewManagerPlugins/Tabview/Tabview.py Mon Sep 23 19:10:42 2019 +0200 @@ -10,11 +10,15 @@ import os -from PyQt5.QtCore import pyqtSlot, QPoint, QFileInfo, pyqtSignal, QEvent, \ - QByteArray, QMimeData, Qt, QSize +from PyQt5.QtCore import ( + pyqtSlot, QPoint, QFileInfo, pyqtSignal, QEvent, QByteArray, QMimeData, + Qt, QSize +) from PyQt5.QtGui import QColor, QDrag, QPixmap -from PyQt5.QtWidgets import QWidget, QHBoxLayout, QSplitter, QTabBar, \ - QApplication, QToolButton, QMenu, QLabel +from PyQt5.QtWidgets import ( + QWidget, QHBoxLayout, QSplitter, QTabBar, QApplication, QToolButton, + QMenu, QLabel +) from E5Gui.E5Application import e5App @@ -84,9 +88,11 @@ @param event reference to the mouse move event @type QMouseEvent """ - if event.buttons() == Qt.MouseButtons(Qt.LeftButton) and \ - (event.pos() - self.__dragStartPos).manhattanLength() > \ - QApplication.startDragDistance(): + if ( + event.buttons() == Qt.MouseButtons(Qt.LeftButton) and + (event.pos() - self.__dragStartPos).manhattanLength() > + QApplication.startDragDistance() + ): drag = QDrag(self) mimeData = QMimeData() index = self.tabAt(event.pos()) @@ -115,11 +121,13 @@ """ mimeData = event.mimeData() formats = mimeData.formats() - if "action" in formats and \ - mimeData.data("action") == b"tab-reordering" and \ - "tabbar-id" in formats and \ - "source-index" in formats and \ - "tabwidget-id" in formats: + if ( + "action" in formats and + mimeData.data("action") == b"tab-reordering" and + "tabbar-id" in formats and + "source-index" in formats and + "tabwidget-id" in formats + ): event.acceptProposedAction() super(TabBar, self).dragEnterEvent(event) @@ -606,8 +614,10 @@ Private method to close the other tabs. """ index = self.contextMenuIndex - for i in list(range(self.count() - 1, index, -1)) + \ - list(range(index - 1, -1, -1)): + for i in ( + list(range(self.count() - 1, index, -1)) + + list(range(index - 1, -1, -1)) + ): editor = self.widget(i).getEditor() self.vm.closeEditorWindow(editor) @@ -878,9 +888,11 @@ # if this was the last editor in this view, switch to the next, that # still has open editors - for i in list(range(self.tabWidgets.index(tw), -1, -1)) + \ + for i in ( + list(range(self.tabWidgets.index(tw), -1, -1)) + list(range(self.tabWidgets.index(tw) + 1, - len(self.tabWidgets))): + len(self.tabWidgets))) + ): if self.tabWidgets[i].hasEditors(): self.currentTabWidget.showIndicator(False) self.currentTabWidget = self.tabWidgets[i] @@ -1321,8 +1333,10 @@ @return always False @rtype bool """ - if event.type() == QEvent.MouseButtonPress and \ - not event.button() == Qt.RightButton: + if ( + event.type() == QEvent.MouseButtonPress and + not event.button() == Qt.RightButton + ): switched = True self.currentTabWidget.showIndicator(False) if isinstance(watched, E5TabWidget): @@ -1333,8 +1347,10 @@ self.currentTabWidget = watched.parent() if switched: index = self.currentTabWidget.selectTab(event.pos()) - switched = self.currentTabWidget.widget(index) is \ + switched = ( + self.currentTabWidget.widget(index) is self.activeWindow() + ) elif isinstance(watched, QScintilla.Editor.Editor): for tw in self.tabWidgets: if tw.hasEditor(watched): @@ -1379,8 +1395,8 @@ if self.filenameOnly: txt = os.path.basename(fn) else: - txt = e5App().getObject("Project")\ - .getRelativePath(fn) + txt = e5App().getObject( + "Project").getRelativePath(fn) if len(txt) > self.maxFileNameChars: txt = "...{0}".format(txt[-self.maxFileNameChars:]) if not QFileInfo(fn).isWritable():
--- a/eric6/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -155,8 +155,10 @@ code += '{0}{1},{2}'.format(istring, parent, os.linesep) code += '{0}self.tr("{1}"),{2}'.format( istring, self.eTitle.text(), os.linesep) - code += '{0}QColorDialog.ColorDialogOptions(' \ + code += ( + '{0}QColorDialog.ColorDialogOptions(' 'QColorDialog.ShowAlphaChannel)'.format(istring) + ) code += '){0}'.format(estring) elif self.rRGBA.isChecked(): code += 'getColor({0}'.format(os.linesep) @@ -170,8 +172,10 @@ code += '{0}{1},{2}'.format(istring, parent, os.linesep) code += '{0}self.tr("{1}"),{2}'.format( istring, self.eTitle.text(), os.linesep) - code += '{0}QColorDialog.ColorDialogOptions(' \ + code += ( + '{0}QColorDialog.ColorDialogOptions(' 'QColorDialog.ShowAlphaChannel)'.format(istring) + ) code += '){0}'.format(estring) return code
--- a/eric6/Plugins/WizardPlugins/DotDesktopWizard/DotDesktopWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/DotDesktopWizard/DotDesktopWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -261,8 +261,9 @@ """ Private slot to select the categories. """ - from .DotDesktopListSelectionDialog import \ + from .DotDesktopListSelectionDialog import ( DotDesktopListSelectionDialog + ) dlg = DotDesktopListSelectionDialog( self.__mainCategories, self.categoriesEdit.text(), ";", @@ -292,8 +293,9 @@ """ Private slot to select the OnlyShowIn environments. """ - from .DotDesktopListSelectionDialog import \ + from .DotDesktopListSelectionDialog import ( DotDesktopListSelectionDialog + ) dlg = DotDesktopListSelectionDialog( self.__showinEnvironments, self.onlyShowEdit.text(), ";") @@ -321,8 +323,9 @@ """ Private slot to select the NotShowIn environments. """ - from .DotDesktopListSelectionDialog import \ + from .DotDesktopListSelectionDialog import ( DotDesktopListSelectionDialog + ) dlg = DotDesktopListSelectionDialog( self.__showinEnvironments, self.notShowEdit.text(), ";")
--- a/eric6/Plugins/WizardPlugins/E5MessageBoxWizard/E5MessageBoxWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/E5MessageBoxWizard/E5MessageBoxWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -260,10 +260,12 @@ E5MessageBox.aboutQt( None, self.eCaption.text() ) - elif self.rInformation.isChecked() or \ - self.rQuestion.isChecked() or \ - self.rWarning.isChecked() or \ - self.rCritical.isChecked(): + elif ( + self.rInformation.isChecked() or + self.rQuestion.isChecked() or + self.rWarning.isChecked() or + self.rCritical.isChecked() + ): buttons = E5MessageBox.NoButton if self.abortCheck.isChecked(): buttons |= E5MessageBox.Abort @@ -339,8 +341,10 @@ E5MessageBox.StandardButtons(buttons), defaultButton ) - elif self.rYesNo.isChecked() or \ - self.rRetryAbort.isChecked(): + elif ( + self.rYesNo.isChecked() or + self.rRetryAbort.isChecked() + ): if self.iconInformation.isChecked(): icon = E5MessageBox.Information elif self.iconQuestion.isChecked(): @@ -521,10 +525,12 @@ msgdlg += ',{0}{1}self.tr("""{2}""")'.format( os.linesep, istring, self.eMessage.toPlainText()) - if self.rInformation.isChecked() or \ - self.rQuestion.isChecked() or \ - self.rWarning.isChecked() or \ - self.rCritical.isChecked(): + if ( + self.rInformation.isChecked() or + self.rQuestion.isChecked() or + self.rWarning.isChecked() or + self.rCritical.isChecked() + ): msgdlg += self.__getStandardButtonCode(istring, indString) msgdlg += self.__getDefaultButtonCode(istring) elif self.rYesNo.isChecked():
--- a/eric6/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/EricPluginWizard/PluginWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -15,10 +15,12 @@ from .Ui_PluginWizardDialog import Ui_PluginWizardDialog -from .Templates import mainTemplate, configTemplate0, configTemplate1, \ - configTemplate2, configTemplate3, onDemandTemplate, \ - previewPixmapTemplate, moduleSetupTemplate, exeDisplayDataTemplate, \ - exeDisplayDataInfoTemplate, exeDisplayDataListTemplate, apiFilesTemplate +from .Templates import ( + mainTemplate, configTemplate0, configTemplate1, configTemplate2, + configTemplate3, onDemandTemplate, previewPixmapTemplate, + moduleSetupTemplate, exeDisplayDataTemplate, exeDisplayDataInfoTemplate, + exeDisplayDataListTemplate, apiFilesTemplate +) class PluginWizardDialog(QDialog, Ui_PluginWizardDialog):
--- a/eric6/Plugins/WizardPlugins/EricPluginWizard/Templates.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/EricPluginWizard/Templates.py Mon Sep 23 19:10:42 2019 +0200 @@ -247,11 +247,11 @@ @rtype list of str """ if language in ["Python3", "Python"]: - apisDir = \\ - os.path.join(os.path.dirname(__file__), "APIs", "Python") + apisDir = os.path.join( + os.path.dirname(__file__), "APIs", "Python") apis = glob.glob(os.path.join(apisDir, '*.api')) - apisDir = \\ - os.path.join(os.path.dirname(__file__), "APIs", "Python3") + apisDir = os.path.join( + os.path.dirname(__file__), "APIs", "Python3") apis.extend(glob.glob(os.path.join(apisDir, '*.api'))) else: apis = [] @@ -259,3 +259,6 @@ ''' + +# +# eflag: noqa = M841
--- a/eric6/Plugins/WizardPlugins/FileDialogWizard/FileDialogWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/FileDialogWizard/FileDialogWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -11,8 +11,9 @@ import os from PyQt5.QtCore import pyqtSlot, QUrl -from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QFileDialog, \ - QButtonGroup +from PyQt5.QtWidgets import ( + QDialog, QDialogButtonBox, QFileDialog, QButtonGroup +) from E5Gui.E5Completers import E5FileCompleter, E5DirCompleter @@ -400,12 +401,14 @@ nameVariable = "res" filterVariable = self.eFilterVariable.text() if not filterVariable: - if (self.__dialogVariant in (-1, 4) and - self.__typeButtonsGroup.checkedButton() in [ - self.rfOpenFile, self.rfOpenFiles, self.rfSaveFile]) or \ - (self.__dialogVariant == 5 and - self.__typeButtonsGroup.checkedButton() in [ - self.rOpenFile, self.rOpenFiles, self.rSaveFile]): + if ( + (self.__dialogVariant in (-1, 4) and + self.__typeButtonsGroup.checkedButton() in [ + self.rfOpenFile, self.rfOpenFiles, self.rfSaveFile]) or + (self.__dialogVariant == 5 and + self.__typeButtonsGroup.checkedButton() in [ + self.rOpenFile, self.rOpenFiles, self.rSaveFile]) + ): filterVariable = ", selectedFilter" else: filterVariable = "" @@ -418,8 +421,11 @@ dialogType = "QFileDialog" code = '{0}{1} = {2}.'.format(nameVariable, filterVariable, dialogType) - if self.rOpenFile.isChecked() or self.rfOpenFile.isChecked() or \ - self.rOpenFileUrl.isChecked(): + if ( + self.rOpenFile.isChecked() or + self.rfOpenFile.isChecked() or + self.rOpenFileUrl.isChecked() + ): if self.rOpenFile.isChecked(): code += 'getOpenFileName({0}{1}'.format(os.linesep, istring) elif self.rOpenFileUrl.isChecked(): @@ -472,17 +478,17 @@ initialFilter = fmt.format(self.eInitialFilter.text()) code += ',{0}{1}{2}'.format(os.linesep, istring, initialFilter) if not self.cSymlinks.isChecked(): - code += \ - ',{0}{1}{2}.Options(' \ - '{2}.DontResolveSymlinks)' \ - .format(os.linesep, istring, dialogType) + code += ',{0}{1}{2}.Options({2}.DontResolveSymlinks)'.format( + os.linesep, istring, dialogType) if self.rOpenFileUrl.isChecked() and bool(self.schemesEdit.text()): - code += \ - ',{0}{1}{2}'.format(os.linesep, istring, - self.__prepareSchemesList()) + code += ',{0}{1}{2}'.format( + os.linesep, istring, self.__prepareSchemesList()) code += '){0}'.format(estring) - elif self.rOpenFiles.isChecked() or self.rfOpenFiles.isChecked() or \ - self.rOpenFileUrls.isChecked(): + elif ( + self.rOpenFiles.isChecked() or + self.rfOpenFiles.isChecked() or + self.rOpenFileUrls.isChecked() + ): if self.rOpenFiles.isChecked(): code += 'getOpenFileNames({0}{1}'.format(os.linesep, istring) elif self.rOpenFileUrls.isChecked(): @@ -535,18 +541,20 @@ initialFilter = fmt.format(self.eInitialFilter.text()) code += ',{0}{1}{2}'.format(os.linesep, istring, initialFilter) if not self.cSymlinks.isChecked(): - code += \ - ',{0}{1}{2}.Options(' \ - '{2}.DontResolveSymlinks)' \ - .format(os.linesep, istring, dialogType) - if self.rOpenFileUrls.isChecked() and \ - bool(self.schemesEdit.text()): - code += \ - ',{0}{1}{2}'.format(os.linesep, istring, - self.__prepareSchemesList()) + code += ',{0}{1}{2}.Options({2}.DontResolveSymlinks)'.format( + os.linesep, istring, dialogType) + if ( + self.rOpenFileUrls.isChecked() and + bool(self.schemesEdit.text()) + ): + code += ',{0}{1}{2}'.format( + os.linesep, istring, self.__prepareSchemesList()) code += '){0}'.format(estring) - elif self.rSaveFile.isChecked() or self.rfSaveFile.isChecked() or \ - self.rSaveFileUrl.isChecked(): + elif ( + self.rSaveFile.isChecked() or + self.rfSaveFile.isChecked() or + self.rSaveFileUrl.isChecked() + ): if self.rSaveFile.isChecked(): code += 'getSaveFileName({0}{1}'.format(os.linesep, istring) elif self.rSaveFileUrl.isChecked(): @@ -598,23 +606,29 @@ fmt = 'self.tr("{0}")' initialFilter = fmt.format(self.eInitialFilter.text()) code += ',{0}{1}{2}'.format(os.linesep, istring, initialFilter) - if (not self.cSymlinks.isChecked()) or \ - (not self.cConfirmOverwrite.isChecked()): + if ( + (not self.cSymlinks.isChecked()) or + (not self.cConfirmOverwrite.isChecked()) + ): code += ',{0}{1}{2}.Options('.format( os.linesep, istring, dialogType) if not self.cSymlinks.isChecked(): code += '{0}.DontResolveSymlinks'.format(dialogType) - if (not self.cSymlinks.isChecked()) and \ - (not self.cConfirmOverwrite.isChecked()): + if ( + (not self.cSymlinks.isChecked()) and + (not self.cConfirmOverwrite.isChecked()) + ): code += ' | ' if not self.cConfirmOverwrite.isChecked(): code += '{0}.DontConfirmOverwrite'.format(dialogType) code += ')' - if self.rSaveFileUrl.isChecked() and \ - bool(self.schemesEdit.text()): - code += \ - ',{0}{1}{2}'.format(os.linesep, istring, - self.__prepareSchemesList()) + if ( + self.rSaveFileUrl.isChecked() and + bool(self.schemesEdit.text()) + ): + code += ',{0}{1}{2}'.format( + os.linesep, istring, self.__prepareSchemesList()) + code += '){0}'.format(estring) elif self.rDirectory.isChecked() or self.rDirectoryUrl.isChecked(): if self.rDirectory.isChecked(): @@ -657,9 +671,8 @@ code += '{0}.Option(0)'.format(dialogType) code += ')' if self.rDirectoryUrl.isChecked(): - code += \ - ',{0}{1}{2}'.format(os.linesep, istring, - self.__prepareSchemesList()) + code += ',{0}{1}{2}'.format( + os.linesep, istring, self.__prepareSchemesList()) code += '){0}'.format(estring) return code
--- a/eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -10,12 +10,14 @@ from PyQt5.QtCore import QRegExp from PyQt5.QtGui import QRegExpValidator -from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, \ - QLineEdit, QPushButton, QDialog, QScrollArea, QComboBox, QVBoxLayout, \ - QLabel +from PyQt5.QtWidgets import ( + QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, QLineEdit, QPushButton, + QDialog, QScrollArea, QComboBox, QVBoxLayout, QLabel +) -from .Ui_PyRegExpWizardCharactersDialog import \ +from .Ui_PyRegExpWizardCharactersDialog import ( Ui_PyRegExpWizardCharactersDialog +) class PyRegExpWizardCharactersDialog( @@ -306,8 +308,10 @@ # character ranges for entrieslist in self.rangesEntries: - if entrieslist[1].text() == "" or \ - entrieslist[2].text() == "": + if ( + entrieslist[1].text() == "" or + entrieslist[2].text() == "" + ): continue index = entrieslist[0].currentIndex() char1 = entrieslist[1].text() @@ -317,10 +321,12 @@ self.__formatCharacter(index, char2)) if regexp: - if (len(regexp) == 2 and - (regexp in self.predefinedClasses or - regexp in self.specialChars)) or \ - len(regexp) == 1: + if ( + (len(regexp) == 2 and + (regexp in self.predefinedClasses or + regexp in self.specialChars)) or + len(regexp) == 1 + ): return regexp else: return "[{0}]".format(regexp)
--- a/eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -13,8 +13,10 @@ from PyQt5.QtCore import QFileInfo, pyqtSlot from PyQt5.QtGui import QClipboard, QTextCursor -from PyQt5.QtWidgets import QWidget, QDialog, QInputDialog, QApplication, \ - QDialogButtonBox, QVBoxLayout, QTableWidgetItem +from PyQt5.QtWidgets import ( + QWidget, QDialog, QInputDialog, QApplication, QDialogButtonBox, + QVBoxLayout, QTableWidgetItem +) from E5Gui import E5MessageBox, E5FileDialog from E5Gui.E5MainWindow import E5MainWindow @@ -271,8 +273,9 @@ """ Private slot to handle the characters toolbutton. """ - from .PyRegExpWizardCharactersDialog import \ + from .PyRegExpWizardCharactersDialog import ( PyRegExpWizardCharactersDialog + ) dlg = PyRegExpWizardCharactersDialog(self) if dlg.exec_() == QDialog.Accepted: self.__insertString(dlg.getCharacters())
--- a/eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -10,9 +10,10 @@ from PyQt5.QtCore import QRegExp from PyQt5.QtGui import QRegExpValidator -from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, \ - QLineEdit, QPushButton, QDialog, QScrollArea, QComboBox, QVBoxLayout, \ - QLabel +from PyQt5.QtWidgets import ( + QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, QLineEdit, QPushButton, + QDialog, QScrollArea, QComboBox, QVBoxLayout, QLabel +) from .Ui_QRegExpWizardCharactersDialog import Ui_QRegExpWizardCharactersDialog @@ -661,8 +662,10 @@ # character ranges for entrieslist in self.rangesEntries: - if not entrieslist[1].text() or \ - not entrieslist[2].text(): + if ( + not entrieslist[1].text() or + not entrieslist[2].text() + ): continue formatIdentifier = entrieslist[0].itemData( entrieslist[0].currentIndex()) @@ -673,10 +676,12 @@ self.__formatCharacter(char2, formatIdentifier)) if regexp: - if (regexp.startswith("\\") and - regexp.count("\\") == 1 and - "-" not in regexp) or \ - len(regexp) == 1: + if ( + (regexp.startswith("\\") and + regexp.count("\\") == 1 and + "-" not in regexp) or + len(regexp) == 1 + ): return regexp else: return "[{0}]".format(regexp)
--- a/eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -12,8 +12,10 @@ from PyQt5.QtCore import QFileInfo, QRegExp, Qt, pyqtSlot from PyQt5.QtGui import QClipboard, QTextCursor -from PyQt5.QtWidgets import QWidget, QDialog, QApplication, QDialogButtonBox, \ - QVBoxLayout, QTableWidgetItem +from PyQt5.QtWidgets import ( + QWidget, QDialog, QApplication, QDialogButtonBox, QVBoxLayout, + QTableWidgetItem +) from E5Gui import E5MessageBox, E5FileDialog from E5Gui.E5MainWindow import E5MainWindow @@ -235,8 +237,9 @@ """ Private slot to handle the characters toolbutton. """ - from .QRegExpWizardCharactersDialog import \ + from .QRegExpWizardCharactersDialog import ( QRegExpWizardCharactersDialog + ) dlg = QRegExpWizardCharactersDialog( mode=QRegExpWizardCharactersDialog.RegExpMode, parent=self) if dlg.exec_() == QDialog.Accepted: @@ -247,8 +250,9 @@ """ Private slot to handle the wildcard characters toolbutton. """ - from .QRegExpWizardCharactersDialog import \ + from .QRegExpWizardCharactersDialog import ( QRegExpWizardCharactersDialog + ) dlg = QRegExpWizardCharactersDialog( mode=QRegExpWizardCharactersDialog.WildcardMode, parent=self) if dlg.exec_() == QDialog.Accepted: @@ -273,8 +277,9 @@ """ Private slot to handle the wildcard characters toolbutton. """ - from .QRegExpWizardCharactersDialog import \ + from .QRegExpWizardCharactersDialog import ( QRegExpWizardCharactersDialog + ) dlg = QRegExpWizardCharactersDialog( mode=QRegExpWizardCharactersDialog.W3CMode, parent=self) if dlg.exec_() == QDialog.Accepted:
--- a/eric6/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardCharactersDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardCharactersDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -10,12 +10,14 @@ from PyQt5.QtCore import QRegExp from PyQt5.QtGui import QRegExpValidator -from PyQt5.QtWidgets import QWidget, QDialog, QVBoxLayout, QHBoxLayout, \ - QScrollArea, QPushButton, QSpacerItem, QSizePolicy, QComboBox, QLineEdit, \ - QLabel +from PyQt5.QtWidgets import ( + QWidget, QDialog, QVBoxLayout, QHBoxLayout, QScrollArea, QPushButton, + QSpacerItem, QSizePolicy, QComboBox, QLineEdit, QLabel +) -from .Ui_QRegularExpressionWizardCharactersDialog import \ +from .Ui_QRegularExpressionWizardCharactersDialog import ( Ui_QRegularExpressionWizardCharactersDialog +) class QRegularExpressionWizardCharactersDialog( @@ -592,8 +594,10 @@ # character ranges for entrieslist in self.rangesEntries: - if not entrieslist[1].text() or \ - not entrieslist[2].text(): + if ( + not entrieslist[1].text() or + not entrieslist[2].text() + ): continue formatIdentifier = entrieslist[0].itemData( entrieslist[0].currentIndex()) @@ -604,10 +608,12 @@ self.__formatCharacter(char2, formatIdentifier)) if regexp: - if (regexp.startswith("\\") and - regexp.count("\\") == 1 and - "-" not in regexp) or \ - len(regexp) == 1: + if ( + (regexp.startswith("\\") and + regexp.count("\\") == 1 and + "-" not in regexp) or + len(regexp) == 1 + ): return regexp else: return "[{0}]".format(regexp)
--- a/eric6/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -15,14 +15,17 @@ from PyQt5.QtCore import QFileInfo, pyqtSlot, QProcess, QByteArray from PyQt5.QtGui import QClipboard, QTextCursor -from PyQt5.QtWidgets import QWidget, QDialog, QInputDialog, QApplication, \ - QDialogButtonBox, QVBoxLayout, QTableWidgetItem +from PyQt5.QtWidgets import ( + QWidget, QDialog, QInputDialog, QApplication, QDialogButtonBox, + QVBoxLayout, QTableWidgetItem +) from E5Gui import E5MessageBox, E5FileDialog from E5Gui.E5MainWindow import E5MainWindow -from .Ui_QRegularExpressionWizardDialog import \ +from .Ui_QRegularExpressionWizardDialog import ( Ui_QRegularExpressionWizardDialog +) import UI.PixmapCache @@ -214,8 +217,9 @@ """ Private slot to handle the characters toolbutton. """ - from .QRegularExpressionWizardCharactersDialog import \ + from .QRegularExpressionWizardCharactersDialog import ( QRegularExpressionWizardCharactersDialog + ) dlg = QRegularExpressionWizardCharactersDialog(self) if dlg.exec_() == QDialog.Accepted: self.__insertString(dlg.getCharacters()) @@ -232,8 +236,9 @@ """ Private slot to handle the repeat toolbutton. """ - from .QRegularExpressionWizardRepeatDialog import \ + from .QRegularExpressionWizardRepeatDialog import ( QRegularExpressionWizardRepeatDialog + ) dlg = QRegularExpressionWizardRepeatDialog(self) if dlg.exec_() == QDialog.Accepted: self.__insertString(dlg.getRepeat())
--- a/eric6/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardRepeatDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardRepeatDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -11,8 +11,9 @@ from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QDialog -from .Ui_QRegularExpressionWizardRepeatDialog import \ +from .Ui_QRegularExpressionWizardRepeatDialog import ( Ui_QRegularExpressionWizardRepeatDialog +) class QRegularExpressionWizardRepeatDialog(
--- a/eric6/Plugins/WizardPlugins/SetupWizard/SetupWizardDialog.py Sat Sep 21 22:03:03 2019 +0200 +++ b/eric6/Plugins/WizardPlugins/SetupWizard/SetupWizardDialog.py Mon Sep 23 19:10:42 2019 +0200 @@ -13,8 +13,9 @@ import datetime from PyQt5.QtCore import pyqtSlot, Qt, QUrl -from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem, \ - QListWidgetItem, QApplication +from PyQt5.QtWidgets import ( + QDialog, QDialogButtonBox, QTreeWidgetItem, QListWidgetItem, QApplication +) from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply from E5Gui.E5Application import e5App @@ -478,8 +479,10 @@ self.authorEmailEdit.setText(project.pdata["EMAIL"][0]) description = project.pdata["DESCRIPTION"][0] - summary = description.split(".", 1)[0]\ - .replace("\r", "").replace("\n", "") + "." + summary = ( + description.split(".", 1)[0].replace("\r", "").replace("\n", "") + + "." + ) self.summaryEdit.setText(summary) self.descriptionEdit.setPlainText(description) @@ -756,8 +759,9 @@ """ Private slot to add an exclude pattern to the list. """ - pattern = self.excludePatternEdit.text()\ - .replace("\\", ".").replace("/", ".") + pattern = ( + self.excludePatternEdit.text().replace("\\", ".").replace("/", ".") + ) if not self.excludePatternList.findItems( pattern, Qt.MatchExactly | Qt.MatchCaseSensitive): QListWidgetItem(pattern, self.excludePatternList)