Stop allowing positional arguments for API.list_direct_messages
authorHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:25:43 +0000 (13:25 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 10 Feb 2021 19:25:43 +0000 (13:25 -0600)
tweepy/api.py

index 95453651e732dcebdf391f9090f21a83832c568e..213c9895b391e9dffb50ddb8b7398d5d7325be80 100644 (file)
@@ -502,11 +502,11 @@ class API:
 
     @pagination(mode='dm_cursor')
     @payload('direct_message', list=True)
-    def list_direct_messages(self, *args, **kwargs):
+    def list_direct_messages(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/list-events
         """
         return self.request(
-            'GET', 'direct_messages/events/list', *args, endpoint_parameters=(
+            'GET', 'direct_messages/events/list', endpoint_parameters=(
                 'count', 'cursor'
             ), **kwargs
         )