Stop allowing positional arguments for API.simple_upload
authorHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 16:20:38 +0000 (10:20 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 16:21:00 +0000 (10:21 -0600)
Stop allowing positional arguments besides filename for API.simple_upload

tweepy/api.py

index 2855a3287f5f2ec444a98159d43056b04fac0d15..a4dcf5d8105c588c51f80dd2d74cc3ae8bad2d5f 100644 (file)
@@ -352,10 +352,10 @@ class API:
             return self.chunked_upload(filename, file=file,
                                        file_type=file_type, *args, **kwargs)
         else:
-            return self.simple_upload(filename, file=file, *args, **kwargs)
+            return self.simple_upload(filename, file=file, **kwargs)
 
     @payload('media')
-    def simple_upload(self, filename, *args, file=None, media_category=None,
+    def simple_upload(self, filename, *, file=None, media_category=None,
                       additional_owners=None, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload
         """
@@ -371,7 +371,7 @@ class API:
             post_data['additional_owners'] = additional_owners
 
         return self.request(
-            'POST', 'media/upload', *args, post_data=post_data, files=files,
+            'POST', 'media/upload', post_data=post_data, files=files,
             upload_api=True, **kwargs
         )