jenkins-bot merged this change.

View Change

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

- use str.format(...) instead of modulo for type specifier
arguments
- use single quotes for string literals

Change-Id: Icd332d9c7a8f8fb2c235d6232cf229d4f2e14ed4
---
M scripts/image.py
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/image.py b/scripts/image.py
index 374b821..ca3a664 100755
--- a/scripts/image.py
+++ b/scripts/image.py
@@ -109,9 +109,10 @@
if self.new_image:
if not self.getOption('loose'):
replacements.append((image_regex,
- u'[[%s:%s\\g<parameters>]]'
- % (self.site.namespaces.FILE.custom_name,
- self.new_image)))
+ '[[{}:{}\\g<parameters>]]'
+ .format(
+ self.site.namespaces.FILE.custom_name,
+ self.new_image)))
else:
replacements.append((image_regex, self.new_image))
else:
@@ -166,5 +167,5 @@
return False


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

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd332d9c7a8f8fb2c235d6232cf229d4f2e14ed4
Gerrit-Change-Number: 462561
Gerrit-PatchSet: 3
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)