Commit 79b99556 authored by Hugo's avatar Hugo
Browse files

Unnecessary list comprehension - 'any' can take a generator

parent 300888b0
......@@ -397,7 +397,7 @@ class TweepyAPITests(TweepyTestCase):
def testgeoapis(self):
def place_name_in_list(place_name, place_list):
"""Return True if a given place_name is in place_list."""
return any([x.full_name.lower() == place_name.lower() for x in place_list])
return any(x.full_name.lower() == place_name.lower() for x in place_list)
twitter_hq = self.api.geo_similar_places(lat='37.7821120598956',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment