Skip to content

Commit 1ca22be

Browse files
committed
Stop allowing positional arguments for API.update_profile_banner
Stop allowing positional arguments besides filename for API.update_profile_banner
1 parent 3dc5604 commit 1ca22be

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tweepy/api.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,16 +836,15 @@ def update_profile_image(self, filename, *, file=None, **kwargs):
836836
), files=files, **kwargs
837837
)
838838

839-
def update_profile_banner(self, filename, *args, file=None, **kwargs):
839+
def update_profile_banner(self, filename, *, file=None, **kwargs):
840840
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile_banner
841841
"""
842842
if file is not None:
843843
files = {'banner': (filename, file)}
844844
else:
845845
files = {'banner': open(filename, 'rb')}
846846
return self.request(
847-
'POST', 'account/update_profile_banner', *args,
848-
endpoint_parameters=(
847+
'POST', 'account/update_profile_banner', endpoint_parameters=(
849848
'width', 'height', 'offset_left', 'offset_right'
850849
), files=files, **kwargs
851850
)

0 commit comments

Comments
 (0)