projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
300888b
)
Unnecessary list comprehension - 'any' can take a generator
author
Hugo
<hugovk@users.noreply.github.com>
Mon, 14 May 2018 13:15:12 +0000
(16:15 +0300)
committer
Hugo
<hugovk@users.noreply.github.com>
Mon, 14 May 2018 13:16:30 +0000
(16:16 +0300)
tests/test_api.py
patch
|
blob
|
blame
|
history
diff --git
a/tests/test_api.py
b/tests/test_api.py
index 664951c3ae7c02eb407e629d19bd9638ce431b01..53a339795528fbea96ae671bb8d7235f667ad5d4 100644
(file)
--- 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',