Tue, 24 Sep 2019 18:45:33 +0200
Continued to resolve code style issue M841.
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/ConfigurationPage/SubversionPage.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/ConfigurationPage/SubversionPage.py Tue Sep 24 18:45:33 2019 +0200 @@ -10,8 +10,9 @@ from PyQt5.QtCore import pyqtSlot -from Preferences.ConfigurationPages.ConfigurationPageBase import \ +from Preferences.ConfigurationPages.ConfigurationPageBase import ( ConfigurationPageBase +) from .Ui_SubversionPage import Ui_SubversionPage
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py Tue Sep 24 18:45:33 2019 +0200 @@ -112,8 +112,10 @@ act.setEnabled(False) for act in self.vcsAddMultiMenuActions: act.setEnabled(True) - if 1 in self.browser.specialMenuEntries and \ - self.__itemsHaveFiles(items): + if ( + 1 in self.browser.specialMenuEntries and + self.__itemsHaveFiles(items) + ): self.vcsMultiMenuAddTree.setEnabled(False) for act in standardItems: act.setEnabled(True) @@ -925,8 +927,8 @@ """ Private method to open the configuration dialog. """ - e5App().getObject("UserInterface")\ - .showPreferences("zzz_subversionPage") + e5App().getObject("UserInterface").showPreferences( + "zzz_subversionPage") def __SVNAddToChangelist(self): """
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/ProjectHelper.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/ProjectHelper.py Tue Sep 24 18:45:33 2019 +0200 @@ -655,8 +655,8 @@ """ Private slot to open the configuration dialog. """ - e5App().getObject("UserInterface")\ - .showPreferences("zzz_subversionPage") + e5App().getObject("UserInterface").showPreferences( + "zzz_subversionPage") def __svnChangeLists(self): """
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -11,8 +11,9 @@ import os from PyQt5.QtCore import QTimer, QProcess, Qt, pyqtSlot -from PyQt5.QtWidgets import QHeaderView, QLineEdit, QDialog, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QHeaderView, QLineEdit, QDialog, QDialogButtonBox, QTreeWidgetItem +) from E5Gui import E5MessageBox @@ -59,8 +60,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) @@ -111,8 +114,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) @@ -179,8 +184,8 @@ self.process.setReadChannel(QProcess.StandardOutput) while self.process.canReadLine(): - s = str(self.process.readLine(), self.__ioEncoding, 'replace')\ - .strip() + s = str( + self.process.readLine(), self.__ioEncoding, 'replace').strip() rev, s = s.split(None, 1) try: author, text = s.split(' ', 1)
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnChangeListsDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnChangeListsDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -11,8 +11,9 @@ import os from PyQt5.QtCore import pyqtSlot, Qt, QProcess, QRegExp, QTimer -from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QListWidgetItem, \ - QLineEdit +from PyQt5.QtWidgets import ( + QDialog, QDialogButtonBox, QListWidgetItem, QLineEdit +) from E5Gui import E5MessageBox @@ -50,11 +51,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, : @@ -94,8 +93,10 @@ 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') if isinstance(path, list): self.dname, fnames = self.vcs.splitPathList(path) @@ -127,8 +128,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) @@ -183,20 +186,26 @@ s = str(self.process.readLine(), Preferences.getSystem("IOEncoding"), 'replace') - if self.currentChangelist != "" and \ - self.rx_status.exactMatch(s): + if ( + self.currentChangelist != "" and + self.rx_status.exactMatch(s) + ): file = self.rx_status.cap(5).strip() filename = file.replace(self.path + os.sep, "") - if filename not in \ - self.changeListsDict[self.currentChangelist]: + if filename not in self.changeListsDict[ + self.currentChangelist + ]: self.changeListsDict[self.currentChangelist].append( filename) - elif self.currentChangelist != "" and \ - self.rx_status2.exactMatch(s): + elif ( + self.currentChangelist != "" and + self.rx_status2.exactMatch(s) + ): file = self.rx_status2.cap(2).strip() filename = file.replace(self.path + os.sep, "") - if filename not in \ - self.changeListsDict[self.currentChangelist]: + if filename not in self.changeListsDict[ + self.currentChangelist + ]: self.changeListsDict[self.currentChangelist].append( filename) elif self.rx_changelist.exactMatch(s):
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -54,8 +54,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) @@ -75,9 +77,11 @@ self.buttonBox.button(QDialogButtonBox.Close).setFocus( Qt.OtherFocusReason) - if Preferences.getVCS("AutoClose") and \ - self.normal and \ - self.errors.toPlainText() == "": + if ( + Preferences.getVCS("AutoClose") and + self.normal and + self.errors.toPlainText() == "" + ): self.accept() def on_buttonBox_clicked(self, button):
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -70,8 +70,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)
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -10,11 +10,14 @@ import os -from PyQt5.QtCore import QTimer, QDate, QProcess, QRegExp, Qt, pyqtSlot, \ - QPoint +from PyQt5.QtCore import ( + QTimer, QDate, QProcess, QRegExp, Qt, pyqtSlot, QPoint +) from PyQt5.QtGui import QCursor -from PyQt5.QtWidgets import QHeaderView, QLineEdit, QWidget, QApplication, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QHeaderView, QLineEdit, QWidget, QApplication, QDialogButtonBox, + QTreeWidgetItem +) from E5Gui import E5MessageBox @@ -132,8 +135,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) @@ -355,8 +360,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) @@ -417,8 +424,10 @@ log["author"], log["date"], log["message"], log["revision"], changedPaths) dt = QDate.fromString(log["date"], Qt.ISODate) - if not self.__maxDate.isValid() and \ - not self.__minDate.isValid(): + if ( + not self.__maxDate.isValid() and + not self.__minDate.isValid() + ): self.__maxDate = dt self.__minDate = dt else: @@ -669,8 +678,11 @@ currentItem = self.logTree.currentItem() for topIndex in range(self.logTree.topLevelItemCount()): topItem = self.logTree.topLevelItem(topIndex) - if topItem.text(2) <= to_ and topItem.text(2) >= from_ and \ - searchRx.indexIn(topItem.text(fieldIndex)) > -1: + if ( + topItem.text(2) <= to_ and + topItem.text(2) >= from_ and + searchRx.indexIn(topItem.text(fieldIndex)) > -1 + ): topItem.setHidden(False) if topItem is currentItem: self.on_logTree_currentItemChanged(topItem, None)
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -53,8 +53,10 @@ self.networkPath = "localhost/" self.localProtocol = True - ipath = Preferences.getMultiProject("Workspace") or \ + ipath = ( + Preferences.getMultiProject("Workspace") or Utilities.getHomeDir() + ) self.__initPaths = [ Utilities.fromNativeSeparators(ipath), Utilities.fromNativeSeparators(ipath) + "/",
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -9,10 +9,12 @@ """ -from PyQt5.QtCore import pyqtSlot, QTimer, QProcess, QProcessEnvironment, \ - QRegExp, Qt -from PyQt5.QtWidgets import QWidget, QHeaderView, QDialogButtonBox, \ - QTreeWidgetItem +from PyQt5.QtCore import ( + pyqtSlot, QTimer, QProcess, QProcessEnvironment, QRegExp, Qt +) +from PyQt5.QtWidgets import ( + QWidget, QHeaderView, QDialogButtonBox, QTreeWidgetItem +) from E5Gui import E5MessageBox @@ -36,9 +38,8 @@ super(SvnPropListDialog, self).__init__(parent) self.setupUi(self) - 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 properties display")) self.refreshButton.setEnabled(False) @@ -92,8 +93,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) @@ -155,8 +158,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)
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -11,8 +11,10 @@ import os from PyQt5.QtGui import QCursor -from PyQt5.QtWidgets import QHeaderView, QLineEdit, QDialog, QApplication, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QHeaderView, QLineEdit, QDialog, QApplication, QDialogButtonBox, + QTreeWidgetItem +) from PyQt5.QtCore import QTimer, QProcess, QRegExp, Qt, pyqtSlot from E5Gui import E5MessageBox @@ -79,8 +81,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) @@ -179,8 +183,10 @@ for line in output.splitlines(): line = line.strip() if line.startswith('<root>'): - repoRoot = line.replace('<root>', '')\ + repoRoot = ( + line.replace('<root>', '') .replace('</root>', '') + ) break else: error = str(process.readAllStandardError(), @@ -363,8 +369,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)
--- 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
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnStatusMonitorThread.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnStatusMonitorThread.py Tue Sep 24 18:45:33 2019 +0200 @@ -32,8 +32,7 @@ self.__ioEncoding = Preferences.getSystem("IOEncoding") - self.rx_status1 = \ - QRegExp('(.{8,9})\\s+([0-9-]+)\\s+(.+)\\s*') + self.rx_status1 = QRegExp('(.{8,9})\\s+([0-9-]+)\\s+(.+)\\s*') self.rx_status2 = QRegExp( '(.{8,9})\\s+([0-9-]+)\\s+([0-9?]+)\\s+(\\S+)\\s+(.+)\\s*') @@ -85,8 +84,10 @@ path = self.rx_status2.cap(5).strip() else: continue - if flags[0] in "ACDMR" or \ - (flags[0] == " " and flags[-1] == "*"): + if ( + flags[0] in "ACDMR" or + (flags[0] == " " and flags[-1] == "*") + ): if flags[-1] == "*": status = "U" else: @@ -115,10 +116,12 @@ else: process.kill() process.waitForFinished() - return False, \ + return ( + False, str(process.readAllStandardError(), Preferences.getSystem("IOEncoding"), 'replace') + ) else: process.kill() process.waitForFinished()
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnTagBranchListDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnTagBranchListDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -11,8 +11,10 @@ import os from PyQt5.QtCore import QTimer, QProcess, QRegExp, Qt, pyqtSlot -from PyQt5.QtWidgets import QHeaderView, QLineEdit, QDialog, QInputDialog, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QHeaderView, QLineEdit, QDialog, QInputDialog, QDialogButtonBox, + QTreeWidgetItem +) from E5Gui import E5MessageBox @@ -62,8 +64,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) @@ -178,8 +182,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)
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py Tue Sep 24 18:45:33 2019 +0200 @@ -78,8 +78,10 @@ self.repoRootLabel2.setText(reposRoot) else: project = e5App().getObject('Project') - if Utilities.normcasepath(path) != \ - Utilities.normcasepath(project.getProjectPath()): + if ( + Utilities.normcasepath(path) != + Utilities.normcasepath(project.getProjectPath()) + ): path = project.getRelativePath(path) reposURL = reposURL.replace(path, '') self.repoRootLabel1.hide() @@ -143,12 +145,16 @@ a flag indicating a diff summary (boolean) """ if self.vcs.otherData["standardLayout"]: - url1 = self.repoRootLabel1.text() + \ - self.typeCombo1.currentText() + \ + url1 = ( + self.repoRootLabel1.text() + + self.typeCombo1.currentText() + self.labelCombo1.currentText() - url2 = self.repoRootLabel2.text() + \ - self.typeCombo2.currentText() + \ + ) + url2 = ( + self.repoRootLabel2.text() + + self.typeCombo2.currentText() + self.labelCombo2.currentText() + ) else: url1 = self.labelCombo1.currentText() url2 = self.labelCombo2.currentText()
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/subversion.py Tue Sep 24 18:42:25 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/subversion.py Tue Sep 24 18:45:33 2019 +0200 @@ -158,8 +158,9 @@ if procStarted: finished = process.waitForFinished(30000) if finished and process.exitCode() == 0: - output = \ - str(process.readAllStandardOutput(), ioEncoding, 'replace') + output = str(process.readAllStandardOutput(), + ioEncoding, + 'replace') self.versionStr = output.split()[2] v = list(re.match(r'.*?(\d+)\.(\d+)\.?(\d+)?', self.versionStr) .groups()) @@ -175,8 +176,8 @@ else: if finished: errMsg = self.tr( - "The svn process finished with the exit code {0}")\ - .format(process.exitCode()) + "The svn process finished with the exit code {0}" + ).format(process.exitCode()) else: errMsg = self.tr( "The svn process did not finish within 30s.") @@ -354,8 +355,10 @@ if tag is None or tag == '': svnUrl = '{0}/trunk'.format(vcsDir) else: - if not tag.startswith('tags') and \ - not tag.startswith('branches'): + if ( + not tag.startswith('tags') and + not tag.startswith('branches') + ): tagType, ok = QInputDialog.getItem( None, self.tr("Subversion Checkout"), @@ -410,8 +413,10 @@ if tag is None or tag == '': svnUrl = '{0}/trunk'.format(vcsDir) else: - if not tag.startswith('tags') and \ - not tag.startswith('branches'): + if ( + not tag.startswith('tags') and + not tag.startswith('branches') + ): tagType, ok = QInputDialog.getItem( None, self.tr("Subversion Export"), @@ -491,13 +496,15 @@ if os.path.isdir(nam): project = e5App().getObject("Project") if nam == project.getProjectPath(): - ok &= project.checkAllScriptsDirty( - reportSyntaxErrors=True) and \ + ok &= ( + project.checkAllScriptsDirty( + reportSyntaxErrors=True) and project.checkDirty() + ) continue elif os.path.isfile(nam): - editor = e5App().getObject("ViewManager")\ - .getOpenEditor(nam) + editor = e5App().getObject("ViewManager").getOpenEditor( + nam) if editor: ok &= editor.checkDirty() if not ok: @@ -517,8 +524,9 @@ if self.__commitDialog is not None: msg = self.__commitDialog.logMessage() if self.__commitDialog.hasChangelists(): - changelists, keepChangelists = \ + changelists, keepChangelists = ( self.__commitDialog.changelistsData() + ) else: changelists, keepChangelists = [], False self.__commitDialog.deleteLater() @@ -547,8 +555,10 @@ dname, fname = self.splitPath(name) args.append(fname) - if self.svnGetReposName(dname).startswith('http') or \ - self.svnGetReposName(dname).startswith('svn'): + if ( + self.svnGetReposName(dname).startswith('http') or + self.svnGetReposName(dname).startswith('svn') + ): noDialog = False if noDialog: @@ -635,10 +645,12 @@ repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: return # oops, project is not version controlled - while os.path.normcase(dname) != os.path.normcase(repodir) and \ - (os.path.normcase(dname) not in self.statusCache or - self.statusCache[os.path.normcase(dname)] == - self.canBeAdded): + while ( + os.path.normcase(dname) != os.path.normcase(repodir) and + (os.path.normcase(dname) not in self.statusCache or + self.statusCache[os.path.normcase(dname)] == + self.canBeAdded) + ): # add directories recursively, if they aren't in the # repository already tree.insert(-1, dname) @@ -664,12 +676,13 @@ repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: return # oops, project is not version controlled - while os.path.normcase(d) != \ - os.path.normcase(repodir) and \ - (d not in tree2 + tree) and \ - (os.path.normcase(d) not in self.statusCache or - self.statusCache[os.path.normcase(d)] == - self.canBeAdded): + while ( + os.path.normcase(d) != os.path.normcase(repodir) and + (d not in tree2 + tree) and + (os.path.normcase(d) not in self.statusCache or + self.statusCache[os.path.normcase(d)] == + self.canBeAdded) + ): tree2.append(d) d = os.path.dirname(d) else: @@ -729,12 +742,13 @@ repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: return # oops, project is not version controlled - while os.path.normcase(d) != \ - os.path.normcase(repodir) and \ - (d not in tree) and \ - (os.path.normcase(d) not in self.statusCache or - self.statusCache[os.path.normcase(d)] == - self.canBeAdded): + while ( + os.path.normcase(d) != os.path.normcase(repodir) and + (d not in tree) and + (os.path.normcase(d) not in self.statusCache or + self.statusCache[os.path.normcase(d)] == + self.canBeAdded) + ): tree.append(d) d = os.path.dirname(d) else: @@ -754,11 +768,12 @@ repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: return # oops, project is not version controlled - while os.path.normcase(dname) != \ - os.path.normcase(repodir) and \ - (os.path.normcase(dname) not in self.statusCache or - self.statusCache[os.path.normcase(dname)] == - self.canBeAdded): + while ( + os.path.normcase(dname) != os.path.normcase(repodir) and + (os.path.normcase(dname) not in self.statusCache or + self.statusCache[os.path.normcase(dname)] == + self.canBeAdded) + ): # add directories recursively, if they aren't in the # repository already tree.insert(-1, dname) @@ -1040,8 +1055,9 @@ project = e5App().getObject("Project") names = [project.getRelativePath(nam) for nam in names] if names[0]: - from UI.DeleteFilesConfirmationDialog import \ + from UI.DeleteFilesConfirmationDialog import ( DeleteFilesConfirmationDialog + ) dlg = DeleteFilesConfirmationDialog( self.parent(), self.tr("Revert changes"), @@ -1571,14 +1587,18 @@ elif commitFound: info['committed-rev'] = rev elif line.startswith('<url>'): - info['url'] = \ + info['url'] = ( line.replace('<url>', '').replace('</url>', '') + ) elif line.startswith('<author>'): - info['last-author'] = line.replace('<author>', '')\ + info['last-author'] = ( + line.replace('<author>', '') .replace('</author>', '') + ) elif line.startswith('<date>'): - value = line.replace('<date>', '')\ - .replace('</date>', '') + value = ( + line.replace('<date>', '').replace('</date>', '') + ) date, time = value.split('T') info['committed-date'] = date info['committed-time'] = "{0}{1}".format( @@ -1634,8 +1654,9 @@ for line in output.splitlines(): line = line.strip() if line.startswith('<url>'): - reposURL = line.replace('<url>', '')\ - .replace('</url>', '') + reposURL = ( + line.replace('<url>', '').replace('</url>', '') + ) return reposURL return "" @@ -1698,9 +1719,11 @@ if res: dia.exec_() res = dia.normalExit() - if res and \ - not rx_prot.exactMatch(target) and \ - target.startswith(project.getProjectPath()): + if ( + res and + not rx_prot.exactMatch(target) and + target.startswith(project.getProjectPath()) + ): if os.path.isdir(name): project.copyDirectory(name, target) else: @@ -2256,10 +2279,9 @@ if procStarted: finished = process.waitForFinished(30000) if finished and process.exitCode() == 0: - output = \ - str(process.readAllStandardOutput(), - Preferences.getSystem("IOEncoding"), - 'replace') + output = str(process.readAllStandardOutput(), + Preferences.getSystem("IOEncoding"), + 'replace') if output: for line in output.splitlines(): if rx_changelist.exactMatch(line): @@ -2362,15 +2384,16 @@ """ helper = self.__plugin.getProjectHelper() helper.setObjects(self, project) - self.__wcng = \ + self.__wcng = ( os.path.exists( - os.path.join(project.getProjectPath(), ".svn", "format")) or \ + os.path.join(project.getProjectPath(), ".svn", "format")) or os.path.exists( - os.path.join(project.getProjectPath(), "_svn", "format")) or \ + os.path.join(project.getProjectPath(), "_svn", "format")) or os.path.exists( - os.path.join(project.getProjectPath(), ".svn", "wc.db")) or \ + os.path.join(project.getProjectPath(), ".svn", "wc.db")) or os.path.exists( os.path.join(project.getProjectPath(), "_svn", "wc.db")) + ) return helper ###########################################################################