diff -r 9986ec0e559a -r 10516539f238 DataViews/PyCoverageDialog.py --- a/DataViews/PyCoverageDialog.py Tue Oct 15 22:03:54 2013 +0200 +++ b/DataViews/PyCoverageDialog.py Fri Oct 18 23:00:41 2013 +0200 @@ -12,8 +12,8 @@ import os from PyQt4.QtCore import pyqtSlot, Qt -from PyQt4.QtGui import QDialog, QDialogButtonBox, QMenu, QHeaderView, QTreeWidgetItem, \ - QApplication, QProgressDialog +from PyQt4.QtGui import QDialog, QDialogButtonBox, QMenu, QHeaderView, \ + QTreeWidgetItem, QApplication, QProgressDialog from E5Gui import E5MessageBox from E5Gui.E5Application import e5App @@ -41,7 +41,8 @@ self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) - self.summaryList.headerItem().setText(self.summaryList.columnCount(), "") + self.summaryList.headerItem().setText( + self.summaryList.columnCount(), "") self.resultList.headerItem().setText(self.resultList.columnCount(), "") self.cancelled = False @@ -63,11 +64,13 @@ self.__menu.addSeparator() self.__menu.addAction(self.trUtf8('Erase Coverage Info'), self.__erase) self.resultList.setContextMenuPolicy(Qt.CustomContextMenu) - self.resultList.customContextMenuRequested.connect(self.__showContextMenu) + self.resultList.customContextMenuRequested.connect( + self.__showContextMenu) def __format_lines(self, lines): """ - Private method to format a list of integers into string by coalescing groups. + Private method to format a list of integers into string by coalescing + groups. @param lines list of integers @return string representing the list @@ -96,7 +99,8 @@ def stringify(pair): """ - Private helper function to generate a string representation of a pair + Private helper function to generate a string representation of a + pair. @param pair pair of integers """ @@ -108,7 +112,8 @@ return ", ".join(map(stringify, pairs)) - def __createResultItem(self, file, statements, executed, coverage, excluded, missing): + def __createResultItem(self, file, statements, executed, coverage, + excluded, missing): """ Private method to create an entry in the result list. @@ -190,8 +195,10 @@ return try: - statements, excluded, missing, readable = cover.analysis2(file)[1:] - readableEx = excluded and self.__format_lines(excluded) or '' + statements, excluded, missing, readable = \ + cover.analysis2(file)[1:] + readableEx = (excluded and self.__format_lines(excluded) + or '') n = len(statements) m = n - len(missing) if n > 0: @@ -234,14 +241,16 @@ if total_exceptions: E5MessageBox.warning(self, self.trUtf8("Parse Error"), - self.trUtf8("""%n file(s) could not be parsed. Coverage info for""" - """ these is not available.""", "", total_exceptions)) + self.trUtf8("""%n file(s) could not be parsed. Coverage""" + """ info for these is not available.""", "", + total_exceptions)) self.__finish() def __finish(self): """ - Private slot called when the action finished or the user pressed the button. + Private slot called when the action finished or the user pressed the + button. """ self.cancelled = True self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)