From 5b98b067e39296cb2bf57938ec71697bd1860b55 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 10:35:41 -0600 Subject: [PATCH] Stop allowing positional arguments for API.chunked_upload_append Stop allowing positional arguments besides media_id, media, and segment_index for API.chunked_upload_append --- tweepy/api.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 1d14f33..ad7c930 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -405,7 +405,7 @@ class API: # The APPEND command returns an empty response body self.chunked_upload_append( media_id, (filename, fp.read(chunk_size)), segment_index, - *args, **kwargs + **kwargs ) fp.close() @@ -435,8 +435,7 @@ class API: upload_api=True, **kwargs ) - def chunked_upload_append(self, media_id, media, segment_index, - *args, **kwargs): + def chunked_upload_append(self, media_id, media, segment_index, **kwargs): """ :reference https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-upload-append """ post_data = { @@ -446,7 +445,7 @@ class API: } files = {'media': media} 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 ) -- 2.25.1