Skip to content

refactor: polish sample#9

Merged
gao-sun merged 1 commit intomasterfrom
gao-polish-sample
May 3, 2025
Merged

refactor: polish sample#9
gao-sun merged 1 commit intomasterfrom
gao-polish-sample

Conversation

@gao-sun
Copy link
Copy Markdown
Contributor

@gao-sun gao-sun commented May 3, 2025

add comments to the sample file

@gao-sun gao-sun requested a review from Copilot May 3, 2025 22:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the sample server file by adding descriptive comments and improving code clarity.

  • Added a file-level docstring to offer a clear description of the server’s purpose
  • Provided detailed inline documentation in the verify_access_token function
  • Updated the middleware mounting section with additional context comments
Comments suppressed due to low confidence (1)

samples/server/whoami.py:52

  • Consider enhancing the verify_access_token docstring to specify which exceptions are raised (e.g., MCPAuthTokenVerificationException) in case of token validation failures.
def verify_access_token(token: str) -> AuthInfo:

@codecov
Copy link
Copy Markdown

codecov bot commented May 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@gao-sun gao-sun merged commit 41c0262 into master May 3, 2025
6 checks passed
@gao-sun gao-sun deleted the gao-polish-sample branch May 3, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants