jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/439460 )
Change subject: [cleanup] use enumerate instead of index counter ......................................................................
[cleanup] use enumerate instead of index counter
Change-Id: I731f521e34733d28b161bfb9321cac7483a54d50 --- M scripts/interwiki.py 1 file changed, 1 insertion(+), 3 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 75a4a77..366b391 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -1506,9 +1506,7 @@ if len(pages) > 1: pywikibot.output(u"=" * 30) pywikibot.output(u"Links to %s" % site) - i = 0 - for page2 in pages: - i += 1 + for i, page2 in enumerate(pages, 1): pywikibot.output(u" (%d) Found link to %s in:" % (i, page2)) self.whereReport(page2, indent=8)