Stop allowing positional arguments for API.chunked_upload_finalize
authorHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 16:37:44 +0000 (10:37 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 16:38:34 +0000 (10:38 -0600)
Stop allowing positional arguments besides media_id for API.chunked_upload_finalize

tweepy/api.py

index ad7c93036c5436bea0e1812011b4556ead046d4b..f0521e6b0338c66561c066ba8de2c4eb4fec8b95 100644 (file)
@@ -410,7 +410,7 @@ class API:
 
         fp.close()
         # The FINALIZE command returns media information
-        return self.chunked_upload_finalize(media_id, *args, **kwargs)
+        return self.chunked_upload_finalize(media_id, **kwargs)
 
     @payload('media')
     def chunked_upload_init(self, total_bytes, media_type, *,
@@ -450,7 +450,7 @@ class API:
         )
 
     @payload('media')
-    def chunked_upload_finalize(self, media_id, *args, **kwargs):
+    def chunked_upload_finalize(self, media_id, **kwargs):
         """ :reference https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-upload-finalize
         """
         headers = {'Content-Type': 'application/x-www-form-urlencoded'}
@@ -459,8 +459,8 @@ class API:
             'media_id': media_id
         }
         return self.request(
-            'POST', 'media/upload', *args, headers=headers,
-            post_data=post_data, upload_api=True, **kwargs
+            'POST', 'media/upload', headers=headers, post_data=post_data,
+            upload_api=True, **kwargs
         )
 
     def create_media_metadata(self, media_id, alt_text, **kwargs):