jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/462807 )
Change subject: [cleanup] cleanup scripts/capitalize_redirects.py ......................................................................
[cleanup] cleanup scripts/capitalize_redirects.py
- use str.format(...) instead of modulo for type specifier arguments. - use single quotes for string literals and double quotes **only** if they contain single quotes within them. - remove preleading "u" fron strings
Change-Id: Ibfabce55206328465a6cda640d084dfe32058b0b --- M scripts/capitalize_redirects.py 1 file changed, 5 insertions(+), 5 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/capitalize_redirects.py b/scripts/capitalize_redirects.py index eaf2c4f..59e79a8 100755 --- a/scripts/capitalize_redirects.py +++ b/scripts/capitalize_redirects.py @@ -72,11 +72,11 @@ else: page_cap = pywikibot.Page(site, page_t.capitalize()) if page_cap.exists(): - pywikibot.output(u'%s already exists, skipping...\n' - % page_cap.title(as_link=True)) + pywikibot.output('{} already exists, skipping...\n' + .format(page_cap.title(as_link=True))) else: - pywikibot.output(u'%s doesn't exist' - % page_cap.title(as_link=True)) + pywikibot.output("{} doesn't exist" + .format(page_cap.title(as_link=True))) if self.user_confirm('Do you want to create a redirect?'): comment = i18n.twtranslate( site, @@ -118,5 +118,5 @@ return False
-if __name__ == "__main__": +if __name__ == '__main__': main()
pywikibot-commits@lists.wikimedia.org