jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/348219 )
Change subject: [PEP8] Keep lines beneath 80 chars
......................................................................
[PEP8] Keep lines beneath 80 chars
Change-Id: I9bfc5d6658fffa2a26196541745e9ed622ab0d5d
---
M scripts/imagecopy.py
M scripts/imagecopy_self.py
M scripts/imageharvest.py
3 files changed, 27 insertions(+), 16 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/imagecopy.py b/scripts/imagecopy.py
index 49ce90b..1e2f454 100644
--- a/scripts/imagecopy.py
+++ b/scripts/imagecopy.py
@@ -77,7 +77,7 @@
#
# Another rewrite by:
# (C) Multichill 2008-2011
-# (C) Pywikibot team, 2007-2016
+# (C) Pywikibot team, 2007-2017
#
# Distributed under the terms of the MIT license.
#
@@ -366,9 +366,10 @@
# Check if both are found and are equal
if (informationMatch and selfMatch):
- if(informationMatch.group('author') ==
selfMatch.group('author')):
+ if informationMatch.group('author') ==
selfMatch.group('author'):
# Replace |Author=Original uploader was ... with |Author= ...
- pageText = informationRegex.sub(r'|Author=\g<author>',
pageText)
+ pageText = informationRegex.sub(r'|Author=\g<author>',
+ pageText)
return pageText
@@ -411,7 +412,7 @@
self.uploader = "Unknown"
# uploader.decode('utf-8')
scrollbar = Tkinter.Scrollbar(self.root, orient=Tkinter.VERTICAL)
- label = Tkinter.Label(self.root, text=u"Enter new name or leave
blank.")
+ label = Tkinter.Label(self.root, text='Enter new name or leave blank.')
imageinfo = Tkinter.Label(self.root, text='Uploaded by %s.' % uploader)
textarea = Tkinter.Text(self.root)
textarea.insert(Tkinter.END, content.encode('utf-8'))
diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py
index 0f2e12f..f0ec351 100644
--- a/scripts/imagecopy_self.py
+++ b/scripts/imagecopy_self.py
@@ -45,7 +45,7 @@
# English Wikipedia specific bot by:
# (C) Multichill 2010-2012
#
-# (C) Pywikibot team, 2010-2016
+# (C) Pywikibot team, 2010-2017
#
# Distributed under the terms of the MIT license.
#
@@ -86,7 +86,8 @@
nowCommonsTemplate = {
'de': u'{{NowCommons|%s}}',
- 'en':
'{{NowCommons|1=File:%s|date=~~~~~|reviewer={{subst:REVISIONUSER}}}}',
+ 'en': ('{{NowCommons|1=File:%s|date=~~~~~|'
+ 'reviewer={{subst:REVISIONUSER}}}}'),
'lb': u'{{Elo op Commons|%s}}',
'nds-nl': u'{{NoenCommons|1=File:%s}}',
'shared': ('{{NowCommons|1=File:%s|date=~~~~~|'
@@ -422,7 +423,11 @@
u'skip': False}
def getNewFieldsFromInformation(self, imagepage):
- """Extract fields from current information template for new
template."""
+ """Extract fields from current information template for new
template.
+
+ @param imagepage: The file page to get the template.
+ @type imagepage: pywikibot.FilePage
+ """
# fields = ['location', 'description', 'source',
'date', 'author',
# 'permission', 'other versions']
# FIXME: The implementation for German has to be checked for the
@@ -733,8 +738,8 @@
self.old_description_label = Tkinter.Label(
self.root, text='The old description was : ')
- self.new_description_label = Tkinter.Label(self.root,
- text='The new fields are : ')
+ self.new_description_label = Tkinter.Label(
+ self.root, text='The new fields are : ')
self.filename_label = Tkinter.Label(self.root, text=u'Filename : ')
self.information_description_label = Tkinter.Label(
self.root, text='Description : ')
@@ -750,8 +755,8 @@
self.information_licensetemplate_label = Tkinter.Label(
self.root, text='License : ')
- self.information_categories_label = Tkinter.Label(self.root,
- text=u'Categories : ')
+ self.information_categories_label = Tkinter.Label(
+ self.root, text=u'Categories : ')
self.filename_field = Tkinter.Entry(self.root)
self.information_description = Tkinter.Entry(self.root)
@@ -937,7 +942,11 @@
return cid
def getOriginalUploadLog(self, imagepage):
- """Get upload log to put at the bottom of the image description
page."""
+ """Get upload log to put at the bottom of the image description
page.
+
+ @param imagepage: The file page to retrieve the log.
+ @type imagepage: pywikibot.FilePage
+ """
filehistory = imagepage.getFileVersionHistory()
filehistory.reverse()
@@ -1065,8 +1074,8 @@
uploaderThread.daemon = False
if autonomous:
- pywikibot.output(u'Bot is running in autonomous mode. There will be no '
- u'user interaction.')
+ pywikibot.output('Bot is running in autonomous mode. There will be no '
+ 'user interaction.')
userInteractionThread.setAutonomous()
if not checkTemplate:
diff --git a/scripts/imageharvest.py b/scripts/imageharvest.py
index eee58ca..300676d 100644
--- a/scripts/imageharvest.py
+++ b/scripts/imageharvest.py
@@ -17,7 +17,7 @@
-justshown Choose _only_ images shown on the page, not those linked
"""
#
-# (C) Pywikibot team, 2004-2016
+# (C) Pywikibot team, 2004-2017
#
# Distributed under the terms of the MIT license.
#
@@ -106,7 +106,8 @@
ilinks = get_imagelinks(url)
for image in ilinks:
- if pywikibot.input_yn(u'Include image %s?' % image, default=False,
automatic_quit=False):
+ if pywikibot.input_yn('Include image %s?' % image, default=False,
+ automatic_quit=False):
desc = pywikibot.input(u"Give the description of this image:")
categories = []
while True:
--
To view, visit
https://gerrit.wikimedia.org/r/348219
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9bfc5d6658fffa2a26196541745e9ed622ab0d5d
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>