Skip to content

Commit 0eef578

Browse files
committed
ruff
1 parent e9cee55 commit 0eef578

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""Simple MCP server with GitHub OAuth authentication."""
1+
"""Simple MCP server with GitHub OAuth authentication."""

examples/servers/simple-auth/mcp_simple_auth/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
from mcp_simple_auth.server import main
66

7-
sys.exit(main())
7+
sys.exit(main())

examples/servers/simple-auth/mcp_simple_auth/server.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def authorize(
103103
f"{self.settings.github_auth_url}"
104104
f"?client_id={self.settings.github_client_id}"
105105
f"&redirect_uri={self.settings.github_callback_path}"
106-
f"&scope={self.settings.github_scope}" # Only request user scope for minimal example
106+
f"&scope={self.settings.github_scope}"
107107
f"&state={state}"
108108
)
109109

@@ -200,7 +200,8 @@ async def exchange_authorization_code(
200200
for token, data in self.tokens.items()
201201
# see https://github.blog/engineering/platform-security/behind-githubs-new-authentication-token-formats/
202202
# which you get depends on your GH app setup.
203-
if (token.startswith("ghu_") or token.startswith('gho_')) and data.client_id == client.client_id
203+
if (token.startswith("ghu_") or token.startswith("gho_"))
204+
and data.client_id == client.client_id
204205
),
205206
None,
206207
)
@@ -243,7 +244,7 @@ async def exchange_refresh_token(
243244
refresh_token: RefreshToken,
244245
scopes: list[str],
245246
) -> OAuthToken:
246-
"""Exchange refresh token """
247+
"""Exchange refresh token"""
247248
raise NotImplementedError("Not supported")
248249

249250
async def revoke_token(

0 commit comments

Comments
 (0)