-
Notifications
You must be signed in to change notification settings - Fork 9.1k
[FIX] mcp_server_git: replace deprecated pydantic functions and small fixes to typing issues
#1753
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
olaservo
merged 13 commits into
modelcontextprotocol:main
from
hesreallyhim-forks:hesreallyhim/git-small-fixes-with-typing-and-strings
Jun 25, 2025
Merged
[FIX] mcp_server_git: replace deprecated pydantic functions and small fixes to typing issues
#1753
olaservo
merged 13 commits into
modelcontextprotocol:main
from
hesreallyhim-forks:hesreallyhim/git-small-fixes-with-typing-and-strings
Jun 25, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
this server has been archived |
olaservo
approved these changes
Jun 25, 2025
Member
olaservo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! This server was reverted from being archived so I reopened this.
Contributor
Author
|
@olaservo oh sweet thanks, much appreciated 🙏 |
PazerOP
referenced
this pull request
in PazerOP/mcp-template
Jul 15, 2025
…es-with-typing-and-strings [FIX] `mcp_server_git`: replace deprecated pydantic functions and small fixes to typing issues
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes some minor typing issues identified by mypy/pylance. It updates a deprecated pydantic function with its equivalent replacement, fixes some typing issues around strings, and adds a
py.typedmarker.Server Details
Motivation and Context
The list of Tools uses the pydantic method
schemawhich is deprecated, as indicated by pylance:In fact,
schemanow just points tomodel_json_schema, so there should be no functional effect.Additionally, two places were showing warnings due to f-strings where the value could be a binary, so this was tweaked to use the
!rsyntax.Additionally,
git.Repowas being used as.refs[base_branch]which was causing pylance to complain.refsis an alias forreferences, as you can see in the source code, but I guess this is confusing for pylance. So I just changed it toreferences. Again, should be no effect.Additionally, added
py.typedfor type-checkers.How Has This Been Tested?
Tested various cases with Inspector, everything working fine. Automated tests are passing.
Breaking Changes
No.
Types of changes
Checklist
Additional context