jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/462783 )
Change subject: [cleanup] cleanup scripts/claimit.py
......................................................................
[cleanup] cleanup scripts/claimit.py
- use str.format(...) instead of modulo for type specifier
arguments.
- use single quotes for string literals
Change-Id: Ieba94a7b2a870107e6e8b3a80cb481e4790f0021
---
M scripts/claimit.py
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/claimit.py b/scripts/claimit.py
index 61e4923..86eda37 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -88,7 +88,8 @@
self.exists_arg = ''.join(x for x in exists_arg.lower() if x in
'pqst')
self.cacheSources()
if self.exists_arg:
- pywikibot.output("'exists' argument set to '%s'" %
self.exists_arg)
+ pywikibot.output("'exists' argument set to '{}'"
+ .format(self.exists_arg))
def treat_page_and_item(self, page, item):
"""Treat each page."""
@@ -146,8 +147,8 @@
target = pywikibot.Coordinate(coord_args[0], coord_args[1],
precision=precision)
else:
raise NotImplementedError(
- "%s datatype is not yet supported by claimit.py"
- % claim.type)
+ '{} datatype is not yet supported by claimit.py'
+ .format(claim.type))
claim.setTarget(target)
claims.append(claim)
@@ -161,5 +162,5 @@
return True
-if __name__ == "__main__":
+if __name__ == '__main__':
main()
--
To view, visit
https://gerrit.wikimedia.org/r/462783
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieba94a7b2a870107e6e8b3a80cb481e4790f0021
Gerrit-Change-Number: 462783
Gerrit-PatchSet: 1
Gerrit-Owner: D3r1ck01 <alangiderick(a)gmail.com>
Gerrit-Reviewer: D3r1ck01 <alangiderick(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)