diff -r 013aee248a62 -r 006ee31b4835 eric6/Project/Project.py --- a/eric6/Project/Project.py Sun Apr 11 11:34:32 2021 +0200 +++ b/eric6/Project/Project.py Sun Apr 11 12:38:16 2021 +0200 @@ -4559,8 +4559,7 @@ self.recentMenu.clear() - idx = 1 - for rp in self.recent: + for idx, rp in enumerate(self.recent, start=1): if idx < 10: formatStr = '&{0:d}. {1}' else: @@ -4571,7 +4570,6 @@ Utilities.compactPath(rp, self.ui.maxMenuFilePathLen))) act.setData(rp) act.setEnabled(QFileInfo(rp).exists()) - idx += 1 self.recentMenu.addSeparator() self.recentMenu.addAction(self.tr('&Clear'), self.clearRecent) @@ -5403,9 +5401,8 @@ 0, len(selectedLists), self.tr("%v/%m Archives")) progress.setMinimumDuration(0) progress.setWindowTitle(self.tr("Create Plugin Archives")) - count = 0 errors = 0 - for pkglist in selectedLists: + for count, pkglist in enumerate(selectedLists): progress.setValue(count) if progress.wasCanceled(): break @@ -5422,7 +5419,6 @@ """<p>Reason: {1}</p>""").format( os.path.basename(pkglist), str(why))) errors += 1 - count += 1 continue lines = names.splitlines() @@ -5451,7 +5447,6 @@ """'; initial_list' line of the header.""" """</p>""").format(os.path.basename(pkglist))) errors += 1 - count += 1 listOK = False break elif line.strip(): @@ -5478,7 +5473,6 @@ """ could not be created.</p>""" """<p>Reason: {1}</p>""").format(archive, str(why))) errors += 1 - count += 1 continue for name in names: @@ -5519,8 +5513,6 @@ if archive not in self.pdata["OTHERS"]: self.appendFile(archive) - - count += 1 progress.setValue(len(selectedLists))