Skip to content

Commit 66ca04a

Browse files
committed
style: apply ruff format to authlib_adapter
1 parent 4208f28 commit 66ca04a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/mcp/client/auth/authlib_adapter.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ async def _perform_authorization_code_flow(self) -> None:
215215
# code_challenge_method is set on the client.
216216
self._client.code_challenge_method = "S256"
217217
# Generate a random code_verifier (Authlib will compute the challenge)
218-
code_verifier = "".join(
219-
secrets.choice(string.ascii_letters + string.digits + "-._~") for _ in range(128)
220-
)
218+
code_verifier = "".join(secrets.choice(string.ascii_letters + string.digits + "-._~") for _ in range(128))
221219

222220
auth_url, _ = self._client.create_authorization_url(
223221
self.config.authorization_endpoint,
@@ -255,9 +253,7 @@ def _inject_bearer(self, request: httpx.Request) -> None:
255253
# httpx.Auth entry point
256254
# ------------------------------------------------------------------
257255

258-
async def async_auth_flow(
259-
self, request: httpx.Request
260-
) -> AsyncGenerator[httpx.Request, httpx.Response]:
256+
async def async_auth_flow(self, request: httpx.Request) -> AsyncGenerator[httpx.Request, httpx.Response]:
261257
"""HTTPX auth flow: ensure a valid token then inject it into the request.
262258
263259
On a ``401`` response the adapter acquires a fresh token (via

0 commit comments

Comments
 (0)