Post merge hotfixes#40
Merged
Merged
Conversation
Changed getattr(config, key, []) to config.get(key, []) in register_parsers() to properly access dictionary keys, fixing zero tools discovery issue.
There was a problem hiding this comment.
Pull request overview
This PR addresses two critical post-merge bugs discovered during a showcase: fixing sub-server tool registration and implementing comprehensive warning suppression for cclib's SyntaxWarning issues under Python 3.12.
Key Changes:
- Fixed dictionary access bug in
__main__.pywheregetattr()was incorrectly used on dict objects instead ofdict.get() - Implemented three-layer warning suppression strategy: runtime filters in
__init__.py, environment variables in MCP templates, and pytest configuration - Added comprehensive documentation explaining the warning suppression approach for different usage contexts
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/parse_patrol/__main__.py |
Fixed tool registration by changing getattr(config, ...) to config.get(...) for proper dictionary access |
src/parse_patrol/parsers/cclib/__init__.py |
New file that suppresses SyntaxWarning from cclib before module imports using warnings.filterwarnings |
src/parse_patrol/parsers/cclib/utils.py |
Changed to relative import (from . import cclib) to use the warning-filtered cclib from __init__.py |
templates/vscode-mcp.json |
Added PYTHONWARNINGS: "ignore::SyntaxWarning" environment variable for MCP server usage |
templates/neovim-mcp.json |
Added PYTHONWARNINGS: "ignore::SyntaxWarning" environment variable for MCP server usage |
templates/claude-desktop-mcp.json |
Added PYTHONWARNINGS: "ignore::SyntaxWarning" environment variable for MCP server usage |
pyproject.toml |
Added ignore::SyntaxWarning to pytest filterwarnings configuration |
README.md |
Added detailed "Warning Suppression for Dependencies" section documenting the three-pronged suppression approach |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
@Sideboard did you encounter this issue with loading the tools when adding |
QuantumChemist
left a comment
Collaborator
There was a problem hiding this comment.
thanks for the hotfixes. I just have this little suggestion.
…ernally Changes to be committed: modified: src/parse_patrol/parsers/cclib/utils.py
Collaborator
|
yay :D |
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
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.
Fixes 2 errors that were not caught during the refactoring. Were noticed during a showcase last week.
cclibwarning under Python 3.12For point 2, this is the first time adding such a wide fix, so the procedure has been added to the docs too.