Update type hints and descriptions in clarifai/client folder#781
Merged
Update type hints and descriptions in clarifai/client folder#781
Conversation
Co-authored-by: zeiler <2138258+zeiler@users.noreply.github.com>
Co-authored-by: zeiler <2138258+zeiler@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update type hints and descriptions
Update type hints and descriptions in clarifai/client folder
Sep 9, 2025
luv-bansal
reviewed
Sep 15, 2025
Contributor
luv-bansal
left a comment
There was a problem hiding this comment.
@zeiler can you please review this PR if we need this
Member
|
we can add it, doesn't hurt. I was mostly just using this prompt for copilot compared to other coding agents. Flipping through it it does seem relevant and good to merge right? |
zeiler
approved these changes
Sep 15, 2025
luv-bansal
approved these changes
Sep 16, 2025
Minimum allowed line rate is |
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.
This PR comprehensively updates type hints and docstring descriptions across all major files in the
clarifai/clientfolder to improve code quality, maintainability, and developer experience.Changes Made
Type Hint Improvements
str = NonetoOptional[str] = Nonefor clarityDicttoDict[str, Any]or more specific types where appropriate-> 'ClassName'Callable[..., Any]for better specificityDocumentation Enhancements
**kwargsparameters with supported optionsRaisessections with specific exception types and conditionsFiles Updated
base.py- Core client functionality with improved gRPC method typingsearch.py- Search API methods with detailed parameter documentationdataset.py- Dataset operations with proper Optional typesmodel.py- Model training and parameter methods with enhanced docsuser.py- User API methods with correct type annotationsworkflow.py- Workflow operations with specific dict typingpipeline.py- Pipeline execution with comprehensive Optional typesmodule.py- Module management with proper type safetypipeline_step.py- Pipeline step operations with consistent typingExample Improvements
Before:
After:
Quality Assurance
This update significantly improves the developer experience by providing better IDE support, more accurate type checking, and clearer documentation while maintaining full backward compatibility.
Fixes #780.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.