-
Notifications
You must be signed in to change notification settings - Fork 70
Add missing type hints #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds missing type hints across multiple modules and adjusts imports to support these annotations.
- Introduces parameter and return type annotations for several functions.
- Updates imports to include new typing constructs.
- Ensures consistency of function signatures without changing runtime logic.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| zencoder/steps/trainer.py | Added List import and annotated parameters/return of permute. |
| zencoder/steps/deployment.py | Added Tuple import and annotated parse_huggingface_url. |
| nightwatch-ai/src/run.py | Annotated main() with -> None. |
| nightwatch-ai/src/pipelines/supabase_summary.py | Typed pipeline parameters and return type. |
| llm-complete-guide/most_basic_rag_pipeline.py | Imported List and added type hints to text processing functions. |
| end-to-end-computer-vision/utils/dataset_utils.py | Typed image loader functions (List[Image.Image]). |
Comments suppressed due to low confidence (2)
llm-complete-guide/most_basic_rag_pipeline.py:33
- [nitpick] The function name
tokenizeis quite generic and could be confused with the standard library module. Consider renaming it totokenize_textfor clarity.
def tokenize(text: str) -> List[str]:
end-to-end-computer-vision/utils/dataset_utils.py:34
- The code uses
ListandImage.Imagebut neitherListfromtypingnorImagefrom the imaging library is imported. Addfrom typing import Listandfrom PIL import Image(or appropriate module) at the top of the file.
def load_images_from_folder(folder: str) -> List[Image.Image]:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds missing type hints across various modules and fixes some import statements to support them.
- Updated type hints in trainer, deployment, pipeline, and text processing functions.
- Improved documentation in function signatures via detailed type annotations.
- Adjusted return types to explicitly communicate function outputs.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| zencoder/steps/trainer.py | Added type hints for the permute function and updated imports. |
| zencoder/steps/deployment.py | Added type hints and expanded docstring for parse_huggingface_url. |
| nightwatch-ai/src/run.py | Added explicit return type for main function. |
| nightwatch-ai/src/pipelines/supabase_summary.py | Included parameter type hints for the pipeline function. |
| llm-complete-guide/most_basic_rag_pipeline.py | Added type hints for text processing and retrieval functions. |
| end-to-end-computer-vision/utils/dataset_utils.py | Updated function signatures with type hints for image loaders. |
Corrected the path to CONTRIBUTING.md in the PR template by changing it from a relative path (CONTRIBUTING.md) to a path that goes up one directory (../CONTRIBUTING.md). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Summary
Testing
ruff check end-to-end-computer-vision/utils/dataset_utils.py llm-complete-guide/most_basic_rag_pipeline.py nightwatch-ai/src/pipelines/supabase_summary.py nightwatch-ai/src/run.py zencoder/steps/deployment.py zencoder/steps/trainer.pypytest -q(fails: command not found)