From ec2498f0d2c14702b69dbdba463e07ce8709b8d5 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 17:11:53 -0600 Subject: [PATCH] Stop allowing positional arguments besides filename for API.media_upload --- tweepy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 34d8932..81d1803 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -334,7 +334,7 @@ class API: ) @payload('media') - def media_upload(self, filename, *args, file=None, **kwargs): + def media_upload(self, filename, *, file=None, **kwargs): """ :reference: https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload """ h = None @@ -354,7 +354,7 @@ class API: kwargs.update({'headers': headers, 'post_data': post_data}) return self.request( - 'POST', 'media/upload', *args, endpoint_parameters=( + 'POST', 'media/upload', endpoint_parameters=( 'media_category', 'additional_owners' ), upload_api=True, **kwargs ) -- 2.25.1