diff --git a/haystack/components/joiners/list_joiner.py b/haystack/components/joiners/list_joiner.py index 7d9d26579..ccd2e4fb8 100644 --- a/haystack/components/joiners/list_joiner.py +++ b/haystack/components/joiners/list_joiner.py @@ -77,7 +77,7 @@ class ListJoiner: if list_type_ is not None: component.set_output_types(self, values=list_type_) else: - component.set_output_types(self, values=List) + component.set_output_types(self, values=List[Any]) def to_dict(self) -> Dict[str, Any]: """ diff --git a/test/components/joiners/test_list_joiner.py b/test/components/joiners/test_list_joiner.py index 5d4f8849a..f5eb88b69 100644 --- a/test/components/joiners/test_list_joiner.py +++ b/test/components/joiners/test_list_joiner.py @@ -101,7 +101,8 @@ class TestListJoiner: pipe = Pipeline() pipe.add_component("joiner", joiner) pipe.add_component("llm", llm) - pipe.connect("joiner.values", "llm.messages") + with pytest.raises(PipelineConnectError): + pipe.connect("joiner.values", "llm.messages") assert pipe is not None def test_pipeline_connection_validation_list_chatmessage(self):