From: Harmon Date: Fri, 19 Feb 2021 22:49:46 +0000 (-0600) Subject: Stop allowing positional arguments for API.update_with_media X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bf5279d679c51613d4e29ab2b89771a2e1363cdb;p=tweepy.git Stop allowing positional arguments for API.update_with_media Stop allowing positional arguments besides filename and status for API.update_with_media --- 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