diff -r 7c017076c12e -r 4cc6f121119a eric6/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py --- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -15,8 +15,10 @@ from PyQt5.QtCore import QMutexLocker, Qt, pyqtSlot from PyQt5.QtGui import QCursor -from PyQt5.QtWidgets import QWidget, QHeaderView, QApplication, QMenu, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QWidget, QHeaderView, QApplication, QMenu, QDialogButtonBox, + QTreeWidgetItem +) from E5Gui.E5Application import e5App from E5Gui import E5MessageBox @@ -58,9 +60,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) @@ -167,12 +168,11 @@ ] self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) self.show() QApplication.processEvents() @@ -240,12 +240,14 @@ itm.setTextAlignment(11, Qt.AlignLeft) itm.setTextAlignment(12, Qt.AlignLeft) - if status in [pysvn.wc_status_kind.added, - pysvn.wc_status_kind.deleted, - pysvn.wc_status_kind.modified] or \ - propStatus in [pysvn.wc_status_kind.added, - pysvn.wc_status_kind.deleted, - pysvn.wc_status_kind.modified]: + if ( + status in [pysvn.wc_status_kind.added, + pysvn.wc_status_kind.deleted, + pysvn.wc_status_kind.modified] or + propStatus in [pysvn.wc_status_kind.added, + pysvn.wc_status_kind.deleted, + pysvn.wc_status_kind.modified] + ): itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable) itm.setCheckState(self.__toBeCommittedColumn, Qt.Checked) else: @@ -326,8 +328,9 @@ for fpath, changelist in changelists: fpath = Utilities.normcasepath(fpath) changelistsDict[fpath] = changelist - hideChangelistColumn = hideChangelistColumn and \ - len(changelistsDict) == 0 + hideChangelistColumn = ( + hideChangelistColumn and len(changelistsDict) == 0 + ) # step 2: determine status of files allFiles = self.client.status(name, recurse=recurse, @@ -337,28 +340,36 @@ for file in allFiles: uptodate = True if file.repos_text_status != pysvn.wc_status_kind.none: - uptodate = uptodate and \ - file.repos_text_status != \ + uptodate = ( + uptodate and + file.repos_text_status != pysvn.wc_status_kind.modified + ) if file.repos_prop_status != pysvn.wc_status_kind.none: - uptodate = uptodate and \ - file.repos_prop_status != \ + uptodate = ( + uptodate and + file.repos_prop_status != pysvn.wc_status_kind.modified + ) lockState = " " - if file.entry is not None and \ - hasattr(file.entry, 'lock_token') and \ - file.entry.lock_token is not None: + if ( + file.entry is not None and + hasattr(file.entry, 'lock_token') and + file.entry.lock_token is not None + ): lockState = "L" if hasattr(file, 'repos_lock') and update: if lockState == "L" and file.repos_lock is None: lockState = "B" elif lockState == " " and file.repos_lock is not None: lockState = "O" - elif lockState == "L" and \ - file.repos_lock is not None and \ - file.entry.lock_token != \ - file.repos_lock["token"]: + elif ( + lockState == "L" and + file.repos_lock is not None and + file.entry.lock_token != + file.repos_lock["token"] + ): lockState = "S" fpath = Utilities.normcasepath( @@ -368,18 +379,27 @@ else: changelist = "" - hidePropertyStatusColumn = hidePropertyStatusColumn and \ + hidePropertyStatusColumn = ( + hidePropertyStatusColumn and file.prop_status in [ pysvn.wc_status_kind.none, pysvn.wc_status_kind.normal ] - hideLockColumns = hideLockColumns and \ - not file.is_locked and lockState == " " + ) + hideLockColumns = ( + hideLockColumns and + not file.is_locked and + lockState == " " + ) hideUpToDateColumn = hideUpToDateColumn and uptodate - hideHistoryColumn = hideHistoryColumn and \ + hideHistoryColumn = ( + hideHistoryColumn and not file.is_copied - hideSwitchedColumn = hideSwitchedColumn and \ + ) + hideSwitchedColumn = ( + hideSwitchedColumn and not file.is_switched + ) self.__generateItem( changelist, @@ -868,8 +888,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