diff -r 3ead033becb8 -r c4b5f3393d63 eric6/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py --- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -12,8 +12,10 @@ import os from PyQt5.QtCore import QTimer, QProcess, QRegExp, Qt, pyqtSlot -from PyQt5.QtWidgets import QWidget, QHeaderView, QLineEdit, QApplication, \ - QMenu, QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QWidget, QHeaderView, QLineEdit, QApplication, QMenu, QDialogButtonBox, + QTreeWidgetItem +) from E5Gui.E5Application import e5App from E5Gui import E5MessageBox @@ -51,9 +53,8 @@ self.__pathColumn = 12 self.__lastColumn = self.statusList.columnCount() - self.refreshButton = \ - self.buttonBox.addButton(self.tr("Refresh"), - QDialogButtonBox.ActionRole) + self.refreshButton = self.buttonBox.addButton( + self.tr("Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( self.tr("Press to refresh the status display")) self.refreshButton.setEnabled(False) @@ -198,11 +199,9 @@ self.rx_status = QRegExp( '(.{8,9})\\s+([0-9-]+)\\s+([0-9?]+)\\s+(\\S+)\\s+(.+)\\s*') # flags (8 or 9 anything), revision, changed rev, author, path - self.rx_status2 = \ - QRegExp('(.{8,9})\\s+(.+)\\s*') + self.rx_status2 = QRegExp('(.{8,9})\\s+(.+)\\s*') # flags (8 or 9 anything), path - self.rx_changelist = \ - QRegExp('--- \\S+ .([\\w\\s]+).:\\s+') + self.rx_changelist = QRegExp('--- \\S+ .([\\w\\s]+).:\\s+') # three dashes, Changelist (translated), quote, # changelist name, quote, : @@ -240,15 +239,17 @@ @param author author of the last change (string) @param path path of the file or directory (string) """ - if self.__nonverbose and \ - status == " " and \ - propStatus == " " and \ - locked == " " and \ - history == " " and \ - switched == " " and \ - lockinfo == " " and \ - uptodate == " " and \ - self.currentChangelist == "": + if ( + self.__nonverbose and + status == " " and + propStatus == " " and + locked == " " and + history == " " and + switched == " " and + lockinfo == " " and + uptodate == " " and + self.currentChangelist == "" + ): return if revision == "": @@ -301,10 +302,15 @@ else: itm.setFlags(itm.flags() & ~Qt.ItemIsUserCheckable) - self.hidePropertyStatusColumn = self.hidePropertyStatusColumn and \ + self.hidePropertyStatusColumn = ( + self.hidePropertyStatusColumn and propStatus == " " - self.hideLockColumns = self.hideLockColumns and \ - locked == " " and lockinfo == " " + ) + self.hideLockColumns = ( + self.hideLockColumns and + locked == " " and + lockinfo == " " + ) self.hideUpToDateColumn = self.hideUpToDateColumn and uptodate == " " self.hideHistoryColumn = self.hideHistoryColumn and history == " " self.hideSwitchedColumn = self.hideSwitchedColumn and switched == " " @@ -318,8 +324,10 @@ @param e close event (QCloseEvent) """ - if self.process is not None and \ - self.process.state() != QProcess.NotRunning: + if ( + self.process is not None and + self.process.state() != QProcess.NotRunning + ): self.process.terminate() QTimer.singleShot(2000, self.process.kill) self.process.waitForFinished(3000) @@ -366,14 +374,18 @@ args.append('status') self.vcs.addArguments(args, self.vcs.options['global']) self.vcs.addArguments(args, self.vcs.options['status']) - if '--verbose' not in self.vcs.options['global'] and \ - '--verbose' not in self.vcs.options['status']: + if ( + '--verbose' not in self.vcs.options['global'] and + '--verbose' not in self.vcs.options['status'] + ): args.append('--verbose') self.__nonverbose = True else: self.__nonverbose = False - if '--show-updates' in self.vcs.options['status'] or \ - '-u' in self.vcs.options['status']: + if ( + '--show-updates' in self.vcs.options['status'] or + '-u' in self.vcs.options['status'] + ): self.activateWindow() self.raise_() if isinstance(fn, list): @@ -413,8 +425,10 @@ Private slot called when the process finished or the user pressed the button. """ - if self.process is not None and \ - self.process.state() != QProcess.NotRunning: + if ( + self.process is not None and + self.process.state() != QProcess.NotRunning + ): self.process.terminate() QTimer.singleShot(2000, self.process.kill) self.process.waitForFinished(3000) @@ -973,8 +987,10 @@ """ modifiedItems = [] for itm in self.statusList.selectedItems(): - if itm.text(self.__statusColumn) in self.modifiedIndicators or \ - itm.text(self.__propStatusColumn) in self.modifiedIndicators: + if ( + itm.text(self.__statusColumn) in self.modifiedIndicators or + itm.text(self.__propStatusColumn) in self.modifiedIndicators + ): modifiedItems.append(itm) return modifiedItems