jenkins-bot has submitted this change and it was merged.
Change subject: Change flickrripper:remove default values for parameters
wherever necessary
......................................................................
Change flickrripper:remove default values for parameters wherever necessary
Remove default values for necessary parameters to avoid errors in functions
Bug: T93098
Change-Id: I9519d7d1dc24640920a50dffe6d326b153459721
---
M scripts/flickrripper.py
1 file changed, 9 insertions(+), 9 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
Xqt: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index cbbe7d7..7fa9bce 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -80,7 +80,7 @@
}
-def getPhoto(flickr=None, photo_id=''):
+def getPhoto(flickr, photo_id):
"""
Get the photo info and the photo sizes so we can use these later on.
@@ -99,7 +99,7 @@
time.sleep(30)
-def isAllowedLicense(photoInfo=None):
+def isAllowedLicense(photoInfo):
"""
Check if the image contains the right license.
@@ -112,7 +112,7 @@
return False
-def getPhotoUrl(photoSizes=None):
+def getPhotoUrl(photoSizes):
"""Get the url of the jpg file with the highest resolution."""
url = ''
# The assumption is that the largest image is last
@@ -121,7 +121,7 @@
return url
-def downloadPhoto(photoUrl=''):
+def downloadPhoto(photoUrl):
"""
Download the photo and store it in a io.BytesIO object.
@@ -153,7 +153,7 @@
return site.getFilesFromAnHash(base64.b16encode(hashObject.digest()))
-def getTags(photoInfo=None):
+def getTags(photoInfo):
"""Get all the tags on a photo."""
result = []
for tag in photoInfo.find('photo').find('tags').findall('tag'):
@@ -162,7 +162,7 @@
return result
-def getFlinfoDescription(photo_id=0):
+def getFlinfoDescription(photo_id):
"""
Get the description from http://wikipedia.ramselehof.de/flinfo.php.
@@ -174,7 +174,7 @@
'http://wikipedia.ramselehof.de/flinfo.php?%s' % parameters).content
-def getFilename(photoInfo=None, site=None, project=u'Flickr'):
+def getFilename(photoInfo, site=None, project=u'Flickr'):
"""Build a good filename for the upload based on the username and title.
Prevents naming collisions.
@@ -279,7 +279,7 @@
return description
-def processPhoto(flickr=None, photo_id=u'', flickrreview=False, reviewer=u'',
+def processPhoto(flickr, photo_id=u'', flickrreview=False, reviewer=u'',
override=u'', addCategory=u'', removeCategories=False,
autonomous=False):
"""Process a single Flickr photo."""
@@ -342,7 +342,7 @@
return 0
-def getPhotos(flickr=None, user_id=u'', group_id=u'', photoset_id=u'',
+def getPhotos(flickr, user_id=u'', group_id=u'', photoset_id=u'',
start_id='', end_id='', tags=u''):
"""Loop over a set of Flickr photos."""
found_start_id = not start_id
--
To view, visit https://gerrit.wikimedia.org/r/273842
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9519d7d1dc24640920a50dffe6d326b153459721
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Darthbhyrava <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: Darthbhyrava <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Multichill <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: hroest <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits