From 82fa9114364d1d0bd143a85905c156212efdb45f Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 19 Feb 2021 11:23:39 -0600 Subject: [PATCH] Specify file kwarg for API.update_profile_banner explicitly --- tweepy/api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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' -- 2.25.1