diff -r 9986ec0e559a -r 10516539f238 Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py --- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py Tue Oct 15 22:03:54 2013 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py Fri Oct 18 23:00:41 2013 +0200 @@ -16,8 +16,8 @@ import os from PyQt4.QtCore import pyqtSlot, QProcess, Qt, QTimer, QCoreApplication -from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \ - QLineEdit +from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, \ + QTreeWidgetItem, QLineEdit from E5Gui import E5MessageBox @@ -28,7 +28,8 @@ class HgBookmarksInOutDialog(QDialog, Ui_HgBookmarksInOutDialog): """ - Class implementing a dialog to show a list of incoming or outgoing bookmarks. + Class implementing a dialog to show a list of incoming or outgoing + bookmarks. """ INCOMING = 0 OUTGOING = 1 @@ -41,6 +42,7 @@ @param mode mode of the dialog (HgBookmarksInOutDialog.INCOMING, HgBookmarksInOutDialog.OUTGOING) @param parent reference to the parent widget (QWidget) + @exception ValueError raised to indicate an invalid dialog mode """ super(HgBookmarksInOutDialog, self).__init__(parent) self.setupUi(self) @@ -60,7 +62,8 @@ self.mode = mode self.__hgClient = vcs.getClient() - self.bookmarksList.headerItem().setText(self.bookmarksList.columnCount(), "") + self.bookmarksList.headerItem().setText( + self.bookmarksList.columnCount(), "") self.bookmarksList.header().setSortIndicator(3, Qt.AscendingOrder) self.process.finished.connect(self.__procFinished) @@ -93,6 +96,7 @@ Public slot to start the bookmarks command. @param path name of directory to be listed (string) + @exception ValueError raised to indicate an invalid dialog mode """ self.errorGroup.hide() @@ -151,7 +155,8 @@ def __finish(self): """ - Private slot called when the process finished or the user pressed the button. + 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: @@ -165,7 +170,8 @@ self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) - self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason) + self.buttonBox.button(QDialogButtonBox.Close).setFocus( + Qt.OtherFocusReason) self.process = None @@ -209,7 +215,8 @@ """ Private method to resize the list columns. """ - self.bookmarksList.header().resizeSections(QHeaderView.ResizeToContents) + self.bookmarksList.header().resizeSections( + QHeaderView.ResizeToContents) self.bookmarksList.header().setStretchLastSection(True) def __generateItem(self, changeset, name):