Stop allowing positional arguments for API.update_with_media
authorHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 22:49:46 +0000 (16:49 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 22:49:46 +0000 (16:49 -0600)
Stop allowing positional arguments besides filename and status for API.update_with_media

tweepy/api.py

index e43adbd36ae97d4b99e5d6e08945dc7dace76102..cff457052567539623fa6aea2dad861b495c8524 100644 (file)
@@ -484,7 +484,7 @@ class API:
         )
 
     @payload('status')
-    def update_with_media(self, filename, status, *args, file=None, **kwargs):
+    def update_with_media(self, filename, status, *, file=None, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update_with_media
         """
         if file is not None:
@@ -492,7 +492,7 @@ class API:
         else:
             files = {'media[]': open(filename, 'rb')}
         return self.request(
-            'POST',  'statuses/update_with_media', *args, endpoint_parameters=(
+            'POST',  'statuses/update_with_media', endpoint_parameters=(
                 'status', 'possibly_sensitive', 'in_reply_to_status_id',
                 'lat', 'long', 'place_id', 'display_coordinates'
             ), status=status, files=files, **kwargs