Skip to content

🧪 fix: resolve typecheck, lint, and test failures#768

Open
claude[bot] wants to merge 1 commit intomainfrom
assistant/test-20260315-012328
Open

🧪 fix: resolve typecheck, lint, and test failures#768
claude[bot] wants to merge 1 commit intomainfrom
assistant/test-20260315-012328

Conversation

@claude
Copy link
Contributor

@claude claude bot commented Mar 15, 2026

Summary

Fixes all validation failures identified during scheduled quality assurance run.

Changes Made

  1. Typecheck Error Fix (src/nodetool/worker/provider_handler.py)

    • Fixed invalid argument type: MessageImageContent expects type="image_url" but code was using type="image"
    • Changed line 210 from type="image" to type="image_url" to match the type definition
  2. Lint Errors Fixed (41 total → 0)

    • Auto-fixed 38 issues using ruff --fix (import sorting, unnecessary mode arguments, whitespace)
    • Manually fixed 3 remaining issues:
      • RUF005: Use list unpacking in tests/test_parity_snapshot_export.py
      • F841: Remove unused variable in tests/worker/test_context_stub.py
      • RUF015: Use next(iter()) instead of single-element slice
  3. Test Failures Fixed (8 failed, 4 errors → 0)

    • Implemented missing search_raw() abstract method in ApifyProvider
    • Implemented missing search_raw() abstract method in DataForSEOProvider
    • Both methods return an appropriate error message as these providers use specific API endpoints, not a generic search_raw interface

Test Results

  • make typecheck: All checks passed
  • make lint: All checks passed
  • make test: 4129 passed, 115 skipped

Files Changed

  • src/nodetool/worker/provider_handler.py - Typecheck fix
  • src/nodetool/agents/serp_providers/apify_provider.py - Added search_raw method
  • src/nodetool/agents/serp_providers/data_for_seo_provider.py - Added search_raw method
  • src/nodetool/providers/huggingface_provider.py - Whitespace fixes
  • Multiple test files - Import sorting and code style improvements

🤖 Generated with Claude Code

- Fix typecheck error in provider_handler.py: use "image_url" instead of "image" for MessageImageContent
- Fix 41 lint errors with ruff auto-fixes and 3 manual fixes
- Fix test failures: implement missing search_raw abstract method in ApifyProvider and DataForSEOProvider
- All validation commands now pass: make typecheck, make lint, make test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

0 participants