projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7d1959
)
Optimize Stream.filter
author
Harmon
<Harmon758@gmail.com>
Sat, 23 Jan 2021 20:21:04 +0000
(14:21 -0600)
committer
Harmon
<Harmon758@gmail.com>
Sat, 23 Jan 2021 20:21:04 +0000
(14:21 -0600)
tweepy/streaming.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/streaming.py
b/tweepy/streaming.py
index 4274794c07c6e5917fa0dcd39c8bdd82bd7e8b33..ece9fe2a1bf89feb63c3080d273ab6592867e573 100644
(file)
--- a/
tweepy/streaming.py
+++ b/
tweepy/streaming.py
@@
-245,10
+245,10
@@
class Stream:
if track:
body['track'] = ','.join(track)
if locations and len(locations) > 0:
- if len(locations) % 4
!= 0
:
+ if len(locations) % 4:
raise TweepError("Wrong number of locations points, "
"it has to be a multiple of 4")
- body['locations'] = ','.join(
[f'{l:.4f}' for l in locations]
)
+ body['locations'] = ','.join(
f'{l:.4f}' for l in locations
)
if filter_level:
body['filter_level'] = filter_level
if languages: