Stop allowing positional arguments for API.update_profile_banner
authorHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 17:17:02 +0000 (11:17 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 19 Feb 2021 17:17:02 +0000 (11:17 -0600)
Stop allowing positional arguments besides filename for API.update_profile_banner

tweepy/api.py

index 7eb16cd3b3e06c61df62e475bd0530610d236e8b..33b506ca774202eda1cd6d9996ffc96c7780763f 100644 (file)
@@ -836,7 +836,7 @@ class API:
             ), files=files, **kwargs
         )
 
-    def update_profile_banner(self, filename, *args, file=None, **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
         """
         if file is not None:
@@ -844,8 +844,7 @@ class API:
         else:
             files = {'banner': open(filename, 'rb')}
         return self.request(
-            'POST', 'account/update_profile_banner', *args,
-            endpoint_parameters=(
+            'POST', 'account/update_profile_banner', endpoint_parameters=(
                 'width', 'height', 'offset_left', 'offset_right'
             ), files=files, **kwargs
         )