From 38f5c4bc93ae1f3d651e9077bdee094be59d582a Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 10:44:56 -0600 Subject: [PATCH] Change API.chunked_upload parameters to be keyword-only Change file, file_type, media_category, and additional_owners API.chunked_upload parameters to be keyword-only --- tweepy/api.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index f720199..801b5ad 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -349,8 +349,8 @@ class API: file_type = mimetypes.guess_type(filename)[0] if chunked or file_type.startswith('video/'): - return self.chunked_upload(filename, file=file, - file_type=file_type, *args, **kwargs) + return self.chunked_upload(filename, *args, file=file, + file_type=file_type, **kwargs) else: return self.simple_upload(filename, file=file, **kwargs) @@ -375,9 +375,8 @@ class API: upload_api=True, **kwargs ) - def chunked_upload(self, filename, file=None, file_type=None, - media_category=None, additional_owners=None, *args, - **kwargs): + def chunked_upload(self, filename, *args, 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 """ fp = file or open(filename, 'rb') -- 2.25.1