diff --git a/tests/test_handle_callable_type.py b/tests/test_handle_callable_type.py index 529b6cf..1b68b24 100644 --- a/tests/test_handle_callable_type.py +++ b/tests/test_handle_callable_type.py @@ -1,5 +1,4 @@ from collections.abc import Callable as CallableABC -from types import NoneType from typing import Any, Callable, Optional, Union import haystack @@ -20,7 +19,7 @@ (str, False), (Any, False), (Union[int, str], False), - (Optional[Callable[[haystack.dataclasses.streaming_chunk.StreamingChunk], NoneType]], True), + (Optional[Callable[[haystack.dataclasses.streaming_chunk.StreamingChunk], type(None)]], True), ], ) def test_is_callable_type(t, expected): @@ -33,7 +32,7 @@ def test_skip_callables_when_creating_pipeline_models(): "generator": { "system_prompt": {"type": Optional[str], "is_mandatory": False, "default_value": None}, "streaming_callback": { - "type": Optional[Callable[[haystack.dataclasses.streaming_chunk.StreamingChunk], NoneType]], + "type": Optional[Callable[[haystack.dataclasses.streaming_chunk.StreamingChunk], type(None)]], "is_mandatory": False, "default_value": None, },