eric6/DataViews/CodeMetricsDialog.py

changeset 8207
d359172d11be
parent 8147
99c7da0ab9d2
child 8218
7c09585bd960
--- a/eric6/DataViews/CodeMetricsDialog.py	Fri Apr 09 18:13:36 2021 +0200
+++ b/eric6/DataViews/CodeMetricsDialog.py	Fri Apr 09 18:38:01 2021 +0200
@@ -169,15 +169,13 @@
         total = collections.defaultdict(int)
         CodeMetrics.summarize(total, 'files', len(files))
         
-        progress = 0
-        
         try:
             # disable updates of the list for speed
             self.resultList.setUpdatesEnabled(False)
             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
                 
@@ -193,7 +191,6 @@
                     self.__createResultItem(fitm, [identifier] + v)
                 self.resultList.expandItem(fitm)
                 
-                progress += 1
                 self.checkProgress.setValue(progress)
                 QApplication.processEvents()
         finally:

eric ide

mercurial