jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/462299 )
Change subject: [cleanup] cleanup scripts/templatecount.py ......................................................................
[cleanup] cleanup scripts/templatecount.py
- remove preleading "u" from strings - use single quotes for string literals - appending using the "+" symbol
Change-Id: Iad7086c9ea66d1c1bb0212826f381b8c291a7163 --- M scripts/templatecount.py 1 file changed, 7 insertions(+), 7 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/templatecount.py b/scripts/templatecount.py index 8a79cc9..cff7f82 100755 --- a/scripts/templatecount.py +++ b/scripts/templatecount.py @@ -92,14 +92,14 @@ template_dict = cls.template_dict(templates, namespaces) pywikibot.stdout('\nList of pages transcluding templates:') for key in templates: - pywikibot.output(u'* %s' % key) + pywikibot.output('* ' + key) pywikibot.stdout('-' * 36) total = 0 for key in template_dict: for page in template_dict[key]: pywikibot.stdout(page.title()) total += 1 - pywikibot.output(u'Total page count: %d' % total) + pywikibot.output('Total page count: {0}'.format(total)) pywikibot.stdout('Report generated on {0}' ''.format(datetime.datetime.utcnow().isoformat()))
@@ -181,9 +181,9 @@
if 'reflist' in args_list: pywikibot.output( - u'NOTE: it will take a long time to count "reflist".') + 'NOTE: it will take a long time to count "reflist".') choice = pywikibot.input_choice( - u'Proceed anyway?', + 'Proceed anyway?', [('yes', 'y'), ('no', 'n'), ('skip', 's')], 'y', automatic_quit=False) if choice == 's': @@ -191,11 +191,11 @@ elif choice == 'n': return
- if operation == "count": + if operation == 'count': robot.countTemplates(args_list, namespaces) - elif operation == "list": + elif operation == 'list': robot.listTemplates(args_list, namespaces)
-if __name__ == "__main__": +if __name__ == '__main__': main()
pywikibot-commits@lists.wikimedia.org