From 53ac19e6a588785589174a2d192221154ec48cc5 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sat, 8 Jan 2022 23:18:57 -0600 Subject: [PATCH] Improve PaginationIterator.__next__ formatting --- tweepy/pagination.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tweepy/pagination.py b/tweepy/pagination.py index 1013394..f61c192 100644 --- a/tweepy/pagination.py +++ b/tweepy/pagination.py @@ -87,9 +87,10 @@ class PaginationIterator: raise StopIteration # https://twittercommunity.com/t/why-does-timeline-use-pagination-token-while-search-uses-next-token/150963 - if self.method.__name__ in ("search_all_tweets", - "search_recent_tweets", - "get_all_tweets_count"): + if self.method.__name__ in ( + "search_all_tweets", "search_recent_tweets", + "get_all_tweets_count" + ): self.kwargs["next_token"] = pagination_token else: self.kwargs["pagination_token"] = pagination_token -- 2.25.1