Skip to content

Feature/add proto#1

Merged
superleesa merged 10 commits intomainfrom
feature/add-proto
Jan 22, 2025
Merged

Feature/add proto#1
superleesa merged 10 commits intomainfrom
feature/add-proto

Conversation

@superleesa
Copy link
Owner

No description provided.

@superleesa superleesa requested a review from Copilot January 22, 2025 22:47
Copy link

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.

Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • haystack_pydantic/core/pipeline/pipeline.py: Evaluated as low risk
  • haystack_pydantic/init.py: Evaluated as low risk
Comments suppressed due to low confidence (3)

.github/workflows/lint_and_test.yml:39

  • The command 'poetry run ruff format --check .' is unconventional for formatting checks. Consider using 'poetry run black --check .' instead.
poetry run ruff format --check .

haystack_pydantic/core/component/init.py:14

  • [nitpick] The variable name 'component' is ambiguous as it conflicts with the imported 'component' module. Consider renaming it to avoid confusion.
component: _Component = cast(_Component, component_module.component)

tests/test_integration.py:36

  • The connect method in pipeline.py should have a dedicated test to verify its functionality.
pipeline.connect("sample_comp1.attr1", "sample_comp2.input1")

# if it's not available, we fallback to the output_types decorator
output_type = inspect.signature(run_func).return_annotation
output_sockets: Mapping[str, InputSocket | OutputSocket]
if issubclass(output_type, BaseModel):
Copy link

Copilot AI Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a guard check to ensure output_type is a class before calling issubclass to prevent potential TypeError. Update the error message to be more specific.

Suggested change
if issubclass(output_type, BaseModel):
if isinstance(output_type, type) and issubclass(output_type, BaseModel):

Copilot uses AI. Check for mistakes.
@superleesa superleesa merged commit 0dfffc0 into main Jan 22, 2025
1 check passed
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.

1 participant