Improve PaginationIterator.__next__ formatting
authorHarmon <Harmon758@gmail.com>
Sun, 9 Jan 2022 05:18:57 +0000 (23:18 -0600)
committerHarmon <Harmon758@gmail.com>
Sun, 9 Jan 2022 05:18:57 +0000 (23:18 -0600)
tweepy/pagination.py

index 101339456a91c56541e04e20850a95768ac1a5cf..f61c192a83d499263b030678b873b90ba982da0b 100644 (file)
@@ -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