Improve OAuth2AppHandler formatting
authorHarmon <Harmon758@gmail.com>
Fri, 7 Jan 2022 11:42:21 +0000 (05:42 -0600)
committerHarmon <Harmon758@gmail.com>
Sat, 8 Jan 2022 00:19:27 +0000 (18:19 -0600)
tweepy/auth.py

index d2c87260f10096dbeb248ae7decc2513f3a57af6..9ae20560067cb7b08f861babd75d85deafe1371c 100644 (file)
@@ -137,10 +137,11 @@ class OAuth2AppHandler(AuthHandler):
         self.consumer_secret = consumer_secret
         self._bearer_token = ''
 
-        resp = requests.post('https://api.twitter.com/oauth2/token',
-                             auth=(self.consumer_key,
-                                   self.consumer_secret),
-                             data={'grant_type': 'client_credentials'})
+        resp = requests.post(
+            'https://api.twitter.com/oauth2/token',
+            auth=(self.consumer_key, self.consumer_secret),
+            data={'grant_type': 'client_credentials'}
+        )
         data = resp.json()
         if data.get('token_type') != 'bearer':
             raise TweepyException('Expected token_type to equal "bearer", '