jenkins-bot merged this change.
[PEP8] pep8 changes
Change-Id: I5bce25043f358229b96fb4926d80c812a0135986
---
M scripts/flickrripper.py
M scripts/interwiki.py
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index 3b1b62c..d3a2ce2 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -356,28 +356,34 @@
user_id=user_id, tags=tags,
per_page='100', page='1')
pages = photos.find('photos').attrib['pages']
- gen = lambda i: flickr.groups_pools_getPhotos( # noqa: E731
- group_id=group_id, user_id=user_id, tags=tags,
- per_page='100', page=i
- ).find('photos').getchildren()
+
+ def gen(i):
+ return flickr.groups_pools_getPhotos(
+ group_id=group_id, user_id=user_id, tags=tags,
+ per_page='100', page=i
+ ).find('photos').getchildren()
# https://www.flickr.com/services/api/flickr.photosets.getPhotos.html
# Get the photos in a photoset
elif photoset_id:
photos = flickr.photosets_getPhotos(photoset_id=photoset_id,
per_page='100', page='1')
pages = photos.find('photoset').attrib['pages']
- gen = lambda i: flickr.photosets_getPhotos( # noqa: E731
- photoset_id=photoset_id, per_page='100', page=i
- ).find('photoset').getchildren()
+
+ def gen(i):
+ return flickr.photosets_getPhotos(
+ photoset_id=photoset_id, per_page='100', page=i
+ ).find('photoset').getchildren()
# https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html
# Get the (public) photos uploaded by a user
elif user_id:
photos = flickr.people_getPublicPhotos(user_id=user_id,
per_page='100', page='1')
pages = photos.find('photos').attrib['pages']
- gen = lambda i: flickr.people_getPublicPhotos( # noqa: E731
- user_id=user_id, per_page='100', page=i
- ).find('photos').getchildren()
+
+ def gen(i):
+ return flickr.people_getPublicPhotos(
+ user_id=user_id, per_page='100', page=i
+ ).find('photos').getchildren()
for i in range(1, int(pages) + 1):
gotPhotos = False
while not gotPhotos:
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index ff40822..c3ac569 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -2282,10 +2282,14 @@
if not summary and \
len(adding) + len(removing) + len(modifying) <= 3:
# Use an extended format for the string linking to all added pages.
- fmt = lambda d, site: UnicodeType(d[site]) # noqa: E731
+
+ def fmt(d, site):
+ return UnicodeType(d[site])
else:
# Use short format, just the language code
- fmt = lambda d, site: site.code # noqa: E731
+
+ def fmt(d, site):
+ return site.code
mods = mcomment = ''
To view, visit change 532473. To unsubscribe, or for help writing mail filters, visit settings.