Open
Conversation
- Applied ruff auto-fixes for 41 linting issues (import sorting, trailing whitespace, style violations) - Fixed type annotation mismatch in provider_handler.py: changed MessageImageContent(type="image") to type="image_url" to match Literal type definition - Removed unnecessary mode argument from patch scripts (UP015) - Reorganized imports in multiple files for consistency (I001) - Cleaned up trailing whitespace in huggingface_provider.py (W291, W293) All lint checks now pass. Typecheck passes with no errors. Tests: 4112 passed (8 pre-existing failures in SERP provider tests unrelated to these changes) 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 41 linting issues and 1 typecheck error found by ruff and basedpyright.
Changes
Linting Fixes (41 issues)
huggingface_provider.py(W291, W293 violations)[sys.executable, SCRIPT] + list(sections)with[sys.executable, SCRIPT, *list(sections)](RUF005)list(blobs.values())[0]withnext(iter(blobs.values()))(RUF015)open()calls (UP015)Typecheck Fix
src/nodetool/worker/provider_handler.py: Fixed type annotation mismatchMessageImageContent(type="image", ...)toMessageImageContent(type="image_url", ...)MessageImageContent.typefield is defined asLiteral["image_url"], notLiteral["image"]Verification
All validation steps pass:
make lint- All 41 linting issues resolvedmake typecheck- No type errorsmake test- 4112 tests passedNote: 8 test failures in SERP provider tests are pre-existing issues unrelated to these changes (ApifyProvider and DataForSEOProvider missing abstract method implementation).
Files Changed
src/nodetool/providers/huggingface_provider.py- Trailing whitespace cleanupsrc/nodetool/worker/provider_handler.py- Import sorting + type fixsrc/nodetool/worker/__main__.py- Import sortingsrc/nodetool/worker/context_stub.py- Import sortingsrc/nodetool/worker/server.py- Import sortingsrc/nodetool/workflows/asset_storage.py- Import sorting🤖 Generated with Claude Code