From: Harmon Date: Fri, 7 Jan 2022 11:42:21 +0000 (-0600) Subject: Improve OAuth2AppHandler formatting X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a8ff5d3d661cb0de94f2322d5c32089e9d4c38c6;p=tweepy.git Improve OAuth2AppHandler formatting --- diff --git a/tweepy/auth.py b/tweepy/auth.py index d2c8726..9ae2056 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -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", '