--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sat Sep 21 18:30:02 2019 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sat Sep 21 20:30:56 2019 +0200 @@ -13,8 +13,10 @@ from PyQt5.QtCore import pyqtSlot, Qt, QTimer from PyQt5.QtGui import QIcon -from PyQt5.QtWidgets import QDialog, QTreeWidgetItem, QAbstractButton, \ - QDialogButtonBox, QApplication, QHeaderView, QListWidgetItem +from PyQt5.QtWidgets import ( + QDialog, QTreeWidgetItem, QAbstractButton, QDialogButtonBox, QApplication, + QHeaderView, QListWidgetItem +) from E5Gui.E5Application import e5App @@ -199,8 +201,10 @@ itm.setIcon(1, UI.PixmapCache.getIcon("syntaxError.png")) if fixed: itm.setIcon(0, UI.PixmapCache.getIcon("issueFixed.png")) - elif code in FixableCodeStyleIssues and not autofixing and \ - code not in self.__noFixCodesList: + elif ( + code in FixableCodeStyleIssues and not autofixing and + code not in self.__noFixCodesList + ): itm.setIcon(0, UI.PixmapCache.getIcon("issueFixable.png")) fixable = True @@ -301,8 +305,10 @@ self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) self.__data = self.__project.getData("CHECKERSPARMS", "Pep8Checker") - if self.__data is None or \ - len(self.__data) < 6: + if ( + self.__data is None or + len(self.__data) < 6 + ): # initialize the data structure self.__data = { "ExcludeFiles": "", @@ -336,8 +342,10 @@ self.__data["LineComplexityScore"] = 10 if "ValidEncodings" not in self.__data: self.__data["ValidEncodings"] = "latin-1, utf-8" - if "CopyrightMinFileSize" not in self.__data or \ - "CopyrightAuthor" not in self.__data: + if ( + "CopyrightMinFileSize" not in self.__data or + "CopyrightAuthor" not in self.__data + ): self.__data["CopyrightMinFileSize"] = 0 self.__data["CopyrightAuthor"] = "" if "FutureChecker" not in self.__data: @@ -437,9 +445,10 @@ filterList = [f.strip() for f in filterString.split(",") if f.strip()] for fileFilter in filterList: - self.files = \ - [f for f in self.files - if not fnmatch.fnmatch(f, fileFilter.strip())] + self.files = [ + f for f in self.files + if not fnmatch.fnmatch(f, fileFilter.strip()) + ] self.__errorItem = None self.__resetStatistics() @@ -457,11 +466,13 @@ repeatMessages = self.repeatCheckBox.isChecked() fixCodes = self.fixIssuesEdit.text() noFixCodes = self.noFixIssuesEdit.text() - self.__noFixCodesList = \ - [c.strip() for c in noFixCodes.split(",") if c.strip()] + self.__noFixCodesList = [ + c.strip() for c in noFixCodes.split(",") if c.strip() + ] fixIssues = self.fixIssuesCheckBox.isChecked() and repeatMessages - self.showIgnored = self.ignoredCheckBox.isChecked() and \ - repeatMessages + self.showIgnored = ( + self.ignoredCheckBox.isChecked() and repeatMessages + ) maxLineLength = self.lineLengthSpinBox.value() maxDocLineLength = self.docLineLengthSpinBox.value() blankLines = ( @@ -529,8 +540,7 @@ options = self.__options[:] flags = Utilities.extractFlags(source) if "noqa" in flags and isinstance(flags["noqa"], basestring): - excludeMessages = \ - options[0].strip().rstrip(",") + excludeMessages = options[0].strip().rstrip(",") if excludeMessages: excludeMessages += "," excludeMessages += flags["noqa"] @@ -1335,8 +1345,9 @@ """ Private slot to add a built-in assignment to be ignored. """ - from .CodeStyleAddBuiltinIgnoreDialog import \ + from .CodeStyleAddBuiltinIgnoreDialog import ( CodeStyleAddBuiltinIgnoreDialog + ) dlg = CodeStyleAddBuiltinIgnoreDialog(self) if dlg.exec_() == QDialog.Accepted: left, right = dlg.getData()