Skip to content

Refactor server setup and ignore type error #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2025
Merged

Refactor server setup and ignore type error #10

merged 2 commits into from
Mar 25, 2025

Conversation

jkawamoto
Copy link
Owner

Description

This pull request includes the following changes:

  • Refactor server setup with functools.partial:
    Replaced the app_lifespan function to use functools.partial for dynamically injecting the callback host and port. Logging was consolidated into a shared LOGGER instance for better consistency. The server initialization process was simplified and clarified for maintainability.

  • Temporarily ignore type error related to AppContext:
    Suppressed type errors surrounding AppContext until modelcontextprotocol/python-sdk#355 is resolved.

Until modelcontextprotocol/python-sdk#355 is solved, we should ignore type errors around AppContext.
Replaced `app_lifespan` with a standalone function and used `functools.partial` for injecting callback host and port dynamically. Consolidated logging setup into a shared `LOGGER` instance for consistency. Simplified and clarified the server initialization process.
@jkawamoto jkawamoto merged commit 0f72460 into main Mar 25, 2025
1 check passed
@jkawamoto jkawamoto deleted the fix-tools branch May 4, 2025 04:41
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.

1 participant