fix: resolve SERP provider abstract method issues and namespace collision#786
Open
claude[bot] wants to merge 1 commit intomainfrom
Open
fix: resolve SERP provider abstract method issues and namespace collision#786claude[bot] wants to merge 1 commit intomainfrom
claude[bot] wants to merge 1 commit intomainfrom
Conversation
…sion Fixes: - Add missing `search_raw` method to ApifyProvider - Add missing `search_raw` method to DataForSEOProvider - Rename `src/nodetool/tools` to `src/nodetool/server_tools` to fix namespace collision with `src/nodetool/agents/tools` - Update all imports from `nodetool.tools` to `nodetool.server_tools` in source and test files - Update patch statements in tests to use new module path This resolves test failures where SERP providers could not be instantiated due to missing abstract method implementations, and fixes mypy errors caused by duplicate "tools" module names. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
This PR fixes critical code quality issues in the nodetool-core codebase:
Issue 1: Missing Abstract Method Implementation
search_rawabstract method fromSerpProviderTypeError: Can't instantiate abstract class without an implementation for abstract method 'search_raw'search_rawmethod that returns an appropriate error message indicating the method is not supported by these providersIssue 2: Namespace Collision
toolsmodules existed:src/nodetool/agents/tools- Agent tools (BrowserTool, NodeTool, etc.)src/nodetool/tools- MCP server tools (WorkflowTools, AssetTools, etc.)error: Duplicate module named "tools"src/nodetool/toolstosrc/nodetool/server_toolsand updated all importsChanges
Added
search_rawmethod to ApifyProvider (src/nodetool/agents/serp_providers/apify_provider.py)Added
search_rawmethod to DataForSEOProvider (src/nodetool/agents/serp_providers/data_for_seo_provider.py)Renamed
src/nodetool/toolstosrc/nodetool/server_toolssrc/nodetool/agents/toolsTest Plan
✅ All ApifyProvider tests pass (13 tests)
⚠️ Pre-existing mypy error for
✅ DataForSEOProvider instantiation test passes
✅ Full test suite passes (3200+ tests)
✅ Ruff linting passes
_remove_base64_images.py(unrelated to this change)Verification
🤖 Generated with Claude Code