Xqt has submitted this change and it was merged.
Change subject: Replace spaces with tabs (pep8 E101)
......................................................................
Replace spaces with tabs (pep8 E101)
Change-Id: Ie6fe1308b53508d7cf095e507a06e34f9ede6085
---
M weblinkchecker.py
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/weblinkchecker.py b/weblinkchecker.py
index f796cac..016a7e9 100644
--- a/weblinkchecker.py
+++ b/weblinkchecker.py
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
msg = {
- 'en': {
- 'weblinkchecker-archive_msg': u'The web page has been saved by the Internet Archive. Please consider linking to an appropriate archived version: [%(URL)s].',
- 'weblinkchecker-caption': u'Dead link',
- 'weblinkchecker-summary': u'Robot: Reporting unavailable external link',
- 'weblinkchecker-report': u'During several automated bot runs the following external link was found to be unavailable. Please check if the link is in fact down and fix or remove it in that case!',
- },
+ 'en': {
+ 'weblinkchecker-archive_msg': u'The web page has been saved by the Internet Archive. Please consider linking to an appropriate archived version: [%(URL)s].',
+ 'weblinkchecker-caption': u'Dead link',
+ 'weblinkchecker-summary': u'Robot: Reporting unavailable external link',
+ 'weblinkchecker-report': u'During several automated bot runs the following external link was found to be unavailable. Please check if the link is in fact down and fix or remove it in that case!',
+ },
'qqq': {
'weblinkchecker-archive_msg': u'weblinkchecker report message for web archives',
'weblinkchecker-caption': u'The weblinkchecker report\'s caption',
--
To view, visit https://gerrit.wikimedia.org/r/96298
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6fe1308b53508d7cf095e507a06e34f9ede6085
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: Fix spelling error in comments. (Google Code-in 2013 student here. Checking to make sure I'm using Gerrit Patch Uploader correctly.)
......................................................................
Fix spelling error in comments. (Google Code-in 2013 student here. Checking to make sure I'm using Gerrit Patch Uploader correctly.)
Change-Id: Ia761980be24f7ddc7673d0a85b96612c2518890c
---
M commonscat.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/commonscat.py b/commonscat.py
index d8e1791..be2fff3 100644
--- a/commonscat.py
+++ b/commonscat.py
@@ -5,7 +5,7 @@
The tool works by following the interwiki links. If the template is present on
another langauge page, the bot will use it.
-You could probably use it at articles as well, but this isnt tested.
+You could probably use it at articles as well, but this isn't tested.
This bot uses pagegenerators to get a list of pages. The following options are
supported:
--
To view, visit https://gerrit.wikimedia.org/r/96149
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia761980be24f7ddc7673d0a85b96612c2518890c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <gerritpatchuploader(a)gmail.com>
Gerrit-Reviewer: Gerrit Patch Uploader <gerritpatchuploader(a)gmail.com>
Gerrit-Reviewer: Guoguo12 <Guoguo12(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: [SYNC] pep8 changes for isbn.py and sync with compat
......................................................................
[SYNC] pep8 changes for isbn.py and sync with compat
Change-Id: I5afb85b841705d5be1f2bde9823d29eb76626ea2
---
M scripts/isbn.py
1 file changed, 43 insertions(+), 20 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/isbn.py b/scripts/isbn.py
index b2eb52a..9af931e 100755
--- a/scripts/isbn.py
+++ b/scripts/isbn.py
@@ -36,7 +36,7 @@
"""
#
-# (C) Pywikibot team, 2013
+# (C) Pywikibot team, 2009-2013
#
# Distributed under the terms of the MIT license.
#
@@ -1215,7 +1215,8 @@
publisherRanges = ranges[groupNumber]
break
else:
- raise InvalidIsbnException('ISBN %s: group number unknown.' % self.code)
+ raise InvalidIsbnException('ISBN %s: group number unknown.'
+ % self.code)
# Determine the publisher
for (start, end) in publisherRanges:
@@ -1225,7 +1226,8 @@
rest = rest[length:]
break
else:
- raise InvalidIsbnException('ISBN %s: publisher number unknown.' % self.code)
+ raise InvalidIsbnException('ISBN %s: publisher number unknown.'
+ % self.code)
# The rest is the item number and the 1-digit checksum.
result += rest[:-1] + '-' + rest[-1]
@@ -1251,14 +1253,17 @@
if c.isdigit():
result.append(int(c))
elif c != '-':
- raise InvalidIsbnException('The ISBN %s contains invalid characters.' % self.code)
+ raise InvalidIsbnException(
+ 'The ISBN %s contains invalid characters.' % self.code)
return result
def checkValidity(self):
if len(self.digits()) != 13:
- raise InvalidIsbnException('The ISBN %s is not 13 digits long.' % self.code)
+ raise InvalidIsbnException('The ISBN %s is not 13 digits long.'
+ % self.code)
if self.calculateChecksum() != self.digits()[-1]:
- raise InvalidIsbnException('The ISBN checksum of %s is incorrect.' % self.code)
+ raise InvalidIsbnException('The ISBN checksum of %s is incorrect.'
+ % self.code)
def calculateChecksum(self):
# See http://en.wikipedia.org/wiki/ISBN#Check_digit_in_ISBN_13
@@ -1287,7 +1292,8 @@
if c.isdigit() or c in 'Xx':
result.append(c)
elif c != '-':
- raise InvalidIsbnException('The ISBN %s contains invalid characters.' % self.code)
+ raise InvalidIsbnException(
+ 'The ISBN %s contains invalid characters.' % self.code)
return result
def checkChecksum(self):
@@ -1304,14 +1310,19 @@
#print checksum
lastDigit = self.digits()[-1]
#print lastDigit
- if not ((checksum == 10 and lastDigit in 'Xx') or (lastDigit.isdigit() and checksum == int(lastDigit))):
- raise InvalidIsbnException('The ISBN checksum of %s is incorrect.' % self.code)
+ if not ((checksum == 10 and lastDigit in 'Xx') or
+ (lastDigit.isdigit() and checksum == int(lastDigit))):
+ raise InvalidIsbnException('The ISBN checksum of %s is incorrect.'
+ % self.code)
def checkValidity(self):
if len(self.digits()) != 10:
- raise InvalidIsbnException('The ISBN %s is not 10 digits long.' % self.code)
+ raise InvalidIsbnException('The ISBN %s is not 10 digits long.'
+ % self.code)
if 'X' in self.digits()[:-1] or 'x' in self.digits()[:-1]:
- raise InvalidIsbnException('ISBN %s: X is only allowed at the end of the ISBN.' % self.code)
+ raise InvalidIsbnException(
+ 'ISBN %s: X is only allowed at the end of the ISBN.'
+ % self.code)
self.checkChecksum()
def toISBN13(self):
@@ -1342,7 +1353,8 @@
try:
i = ISBN10(code)
except InvalidIsbnException, e10:
- raise InvalidIsbnException(u'ISBN-13: %s / ISBN-10: %s' % (e13, e10))
+ raise InvalidIsbnException(u'ISBN-13: %s / ISBN-10: %s'
+ % (e13, e10))
return i
@@ -1387,6 +1399,7 @@
class IsbnBot:
+
def __init__(self, generator, to13=False, format=False, always=False):
self.generator = generator
self.to13 = to13
@@ -1413,9 +1426,11 @@
newText = self.isbnR.sub(_hyphenateIsbnNumber, newText)
self.save(page, newText)
except pywikibot.NoPage:
- pywikibot.output(u"Page %s does not exist?!" % page.title(asLink=True))
+ pywikibot.output(u"Page %s does not exist?!"
+ % page.title(asLink=True))
except pywikibot.IsRedirectPage:
- pywikibot.output(u"Page %s is a redirect; skipping." % page.title(asLink=True))
+ pywikibot.output(u"Page %s is a redirect; skipping."
+ % page.title(asLink=True))
except pywikibot.LockedPage:
pywikibot.output(u"Page %s is locked?!" % page.title(asLink=True))
@@ -1423,10 +1438,13 @@
if text != page.get():
# Show the title of the page we're working on.
# Highlight the title in purple.
- pywikibot.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title())
+ pywikibot.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<"
+ % page.title())
pywikibot.showDiff(page.get(), text)
if not self.always:
- choice = pywikibot.inputChoice(u'Do you want to accept these changes?', ['Yes', 'No', 'Always yes'], ['y', 'N', 'a'], 'N')
+ choice = pywikibot.inputChoice(
+ u'Do you want to accept these changes?',
+ ['Yes', 'No', 'Always yes'], ['y', 'N', 'a'], 'N')
if choice == 'n':
return
elif choice == 'a':
@@ -1436,11 +1454,15 @@
try:
page.put(text, comment=self.comment)
except pywikibot.EditConflict:
- pywikibot.output(u'Skipping %s because of edit conflict' % (page.title(),))
+ pywikibot.output(u'Skipping %s because of edit conflict'
+ % (page.title(),))
except pywikibot.SpamfilterError, e:
- pywikibot.output(u'Cannot change %s because of blacklist entry %s' % (page.title(), e.url))
+ pywikibot.output(
+ u'Cannot change %s because of blacklist entry %s'
+ % (page.title(), e.url))
except pywikibot.LockedPage:
- pywikibot.output(u'Skipping %s (locked page)' % (page.title(),))
+ pywikibot.output(u'Skipping %s (locked page)'
+ % (page.title(),))
else:
# Save the page in the background. No need to catch exceptions.
page.put(text, comment=self.comment, async=True)
@@ -1487,7 +1509,8 @@
site = pywikibot.getSite()
site.login()
if pageTitle:
- gen = iter([pywikibot.Page(pywikibot.Link(t, site)) for t in pageTitle])
+ gen = iter([pywikibot.Page(pywikibot.Link(t, site))
+ for t in pageTitle])
if not gen:
gen = genFactory.getCombinedGenerator()
if not gen:
--
To view, visit https://gerrit.wikimedia.org/r/95836
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5afb85b841705d5be1f2bde9823d29eb76626ea2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot