From bf5279d679c51613d4e29ab2b89771a2e1363cdb Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 16:49:46 -0600 Subject: [PATCH] Stop allowing positional arguments for API.update_with_media Stop allowing positional arguments besides filename and status for API.update_with_media --- tweepy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index e43adbd..cff4570 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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 -- 2.25.1