From 79b99556c388cac0cf94222159ff1998926a1a4b Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 14 May 2018 16:15:12 +0300 Subject: [PATCH] Unnecessary list comprehension - 'any' can take a generator --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 664951c..53a3397 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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', long='-122.400612831116', -- 2.25.1