@@ -376,9 +376,7 @@ async def _exchange_code_for_token(self, auth_code: str, client_info: OAuthClien
376376 token_data ["client_id" ] = client_info .client_id
377377 token_data ["client_secret" ] = client_info .client_secret
378378 case "client_secret_basic" if client_info .client_secret :
379- basic = b64encode (
380- f"{ client_info .client_id } :{ client_info .client_secret } " .encode ()
381- ).decode ()
379+ basic = b64encode (f"{ client_info .client_id } :{ client_info .client_secret } " .encode ()).decode ()
382380 extra_headers = {"Authorization" : f"Basic { basic } " }
383381 case _:
384382 pass
@@ -387,8 +385,7 @@ async def _exchange_code_for_token(self, auth_code: str, client_info: OAuthClien
387385 response = await client .post (
388386 token_url ,
389387 data = token_data ,
390- headers = {"Content-Type" : "application/x-www-form-urlencoded" }
391- | extra_headers ,
388+ headers = {"Content-Type" : "application/x-www-form-urlencoded" } | extra_headers ,
392389 timeout = 30.0 ,
393390 )
394391
@@ -448,9 +445,7 @@ async def _refresh_access_token(self) -> bool:
448445 refresh_data ["client_id" ] = client_info .client_id
449446 refresh_data ["client_secret" ] = client_info .client_secret
450447 case "client_secret_basic" if client_info .client_secret :
451- basic = b64encode (
452- f"{ client_info .client_id } :{ client_info .client_secret } " .encode ()
453- ).decode ()
448+ basic = b64encode (f"{ client_info .client_id } :{ client_info .client_secret } " .encode ()).decode ()
454449 extra_headers = {"Authorization" : f"Basic { basic } " }
455450 case _:
456451 pass
@@ -460,8 +455,7 @@ async def _refresh_access_token(self) -> bool:
460455 response = await client .post (
461456 token_url ,
462457 data = refresh_data ,
463- headers = {"Content-Type" : "application/x-www-form-urlencoded" }
464- | extra_headers ,
458+ headers = {"Content-Type" : "application/x-www-form-urlencoded" } | extra_headers ,
465459 timeout = 30.0 ,
466460 )
467461
0 commit comments