Stop allowing positional arguments for API.chunked_upload
authorHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 16:46:17 +0000 (10:46 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 16:46:17 +0000 (10:46 -0600)
Stop allowing positional arguments besides filename for API.chunked_upload

tweepy/api.py

index 801b5ad9e3274da31ec2e6911d9f6582ec3716a1..d18c3312550c37b1932044d75038f37029c2a714 100644 (file)
@@ -349,7 +349,7 @@ class API:
             file_type = mimetypes.guess_type(filename)[0]
 
         if chunked or file_type.startswith('video/'):
-            return self.chunked_upload(filename, *args, file=file,
+            return self.chunked_upload(filename, file=file,
                                        file_type=file_type, **kwargs)
         else:
             return self.simple_upload(filename, file=file, **kwargs)
@@ -375,7 +375,7 @@ class API:
             upload_api=True, **kwargs
         )
 
-    def chunked_upload(self, filename, *args, file=None, file_type=None,
+    def chunked_upload(self, filename, *, file=None, file_type=None,
                        media_category=None, additional_owners=None, **kwargs):
         """ :reference https://developer.twitter.com/en/docs/media/upload-media/uploading-media/chunked-media-upload
         """