diff -r adf11836cfce -r d359172d11be eric6/DataViews/PyCoverageDialog.py --- a/eric6/DataViews/PyCoverageDialog.py Fri Apr 09 18:13:36 2021 +0200 +++ b/eric6/DataViews/PyCoverageDialog.py Fri Apr 09 18:38:01 2021 +0200 @@ -186,7 +186,6 @@ total_exceptions = 0 cover.exclude(self.excludeList[0]) - progress = 0 try: # disable updates of the list for speed @@ -194,7 +193,7 @@ self.resultList.setSortingEnabled(False) # now go through all the files - for file in files: + for progress, file in enumerate(files, start=1): if self.cancelled: return @@ -217,7 +216,6 @@ except CoverageException: total_exceptions += 1 - progress += 1 self.checkProgress.setValue(progress) QApplication.processEvents() finally: @@ -359,14 +357,12 @@ 0, len(files), self.tr("%v/%m Files"), self) progress.setMinimumDuration(0) progress.setWindowTitle(self.tr("Coverage")) - count = 0 - for file in files: + for count, file in enumerate(files): progress.setValue(count) if progress.wasCanceled(): break cover.annotate([file], None) # , True) - count += 1 progress.setValue(len(files))