Skip to content

Conversation

@strickvl
Copy link
Contributor

Summary

  • add parameter and return type hints across several projects
  • fix a few imports for the hints

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.py
  • pytest -q (fails: command not found)

@dagshub
Copy link

dagshub bot commented May 17, 2025

@strickvl strickvl requested review from AlexejPenner and Copilot May 17, 2025 16:28
@strickvl strickvl added enhancement New feature or request internal labels May 17, 2025
Copy link
Contributor

Copilot AI left a 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 tokenize is quite generic and could be confused with the standard library module. Consider renaming it to tokenize_text for clarity.
def tokenize(text: str) -> List[str]:

end-to-end-computer-vision/utils/dataset_utils.py:34

  • The code uses List and Image.Image but neither List from typing nor Image from the imaging library is imported. Add from typing import List and from PIL import Image (or appropriate module) at the top of the file.
def load_images_from_folder(folder: str) -> List[Image.Image]:

@strickvl strickvl requested a review from Copilot May 17, 2025 21:11
Copy link
Contributor

Copilot AI left a 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]>
@strickvl strickvl merged commit b727eaa into main May 17, 2025
5 checks passed
@strickvl strickvl deleted the codex/add-type-hints-to-function-parameters branch May 17, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex enhancement New feature or request internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants