From: Harmon Date: Fri, 19 Feb 2021 17:23:39 +0000 (-0600) Subject: Specify file kwarg for API.update_profile_banner explicitly X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=82fa9114364d1d0bd143a85905c156212efdb45f;p=tweepy.git Specify file kwarg for API.update_profile_banner explicitly --- diff --git a/tweepy/api.py b/tweepy/api.py index d74e5a0..4d2672b 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -715,12 +715,11 @@ class API: ), post_data=post_data, headers=headers, **kwargs ) - def update_profile_banner(self, filename, **kwargs): + def update_profile_banner(self, filename, *, file=None, **kwargs): """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile_banner """ - f = kwargs.pop('file', None) headers, post_data = API._pack_image(filename, 700, - form_field='banner', f=f) + form_field='banner', f=file) return self.request( 'POST', 'account/update_profile_banner', endpoint_parameters=( 'width', 'height', 'offset_left', 'offset_right'