jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[cleanup] cleanup scripts/surnames_redirects.py

- use single quotes for string literals and double quotes with
strings that consist of single quotes within them
- use str.format(...) instead of modulo for type specifiers in
strings

Change-Id: I171c6169a8270419b1afc12e99663c12e1a5c395
---
M scripts/surnames_redirects.py
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/surnames_redirects.py b/scripts/surnames_redirects.py
index 5ea2abd..21ef0d1 100755
--- a/scripts/surnames_redirects.py
+++ b/scripts/surnames_redirects.py
@@ -83,11 +83,11 @@

new_page = pywikibot.Page(site, possible_name)
if new_page.exists():
- pywikibot.output('%s already exists, skipping...'
- % new_page.title(as_link=True))
+ pywikibot.output('{0} already exists, skipping...'
+ .format(new_page.title(as_link=True)))
else:
- pywikibot.output('%s doesn\'t exist'
- % new_page.title(as_link=True))
+ pywikibot.output("{0} doesn't exist"
+ .format(new_page.title(as_link=True)))
choice = pywikibot.input_yn(
'Do you want to create a redirect?')
if choice:
@@ -127,5 +127,5 @@
pywikibot.bot.suggest_help(missing_generator=True)


-if __name__ == "__main__":
+if __name__ == '__main__':
main()

To view, visit change 462304. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I171c6169a8270419b1afc12e99663c12e1a5c395
Gerrit-Change-Number: 462304
Gerrit-PatchSet: 1
Gerrit-Owner: D3r1ck01 <alangiderick@gmail.com>
Gerrit-Reviewer: D3r1ck01 <alangiderick@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)