jenkins-bot merged this change.
[cleanup] cleanup scripts/freebasemappingupload.py
- use str.format(...) instead of modulo for type specifier
arguments.
Change-Id: I3e2c7e70fcff11ddac2d278abc3a306081db7349
---
M scripts/freebasemappingupload.py
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/scripts/freebasemappingupload.py b/scripts/freebasemappingupload.py
index 21a4af5..6a13e42 100755
--- a/scripts/freebasemappingupload.py
+++ b/scripts/freebasemappingupload.py
@@ -83,15 +83,16 @@
else:
# Just pick up the first label
label = list(data.labels.values())[0]
- pywikibot.output('Parsed: %s <--> %s' % (qid, mid))
- pywikibot.output('%s is %s' % (data.getID(), label))
+ pywikibot.output('Parsed: {} <--> {}'.format(qid, mid))
+ pywikibot.output('{} is {}'.format(data.getID(), label))
if data.claims and 'P646' in data.claims:
# We assume that there is only one claim.
# If there are multiple ones, our logs might be wrong
# but the constraint value reports will catch them
if mid != data.claims['P646'][0].getTarget():
- pywikibot.output('Mismatch: expected %s, has %s instead'
- % (mid, data.claims['P646'][0].getTarget()))
+ pywikibot.output('Mismatch: expected {}, has {} instead'
+ .format(mid,
+ data.claims['P646'][0].getTarget()))
else:
pywikibot.output('Already has mid set, is consistent.')
else:
To view, visit change 462649. To unsubscribe, or for help writing mail filters, visit settings.