diff --git a/tests/test_pregel.py b/tests/test_pregel.py index 80c47840b..55953a18f 100644 --- a/tests/test_pregel.py +++ b/tests/test_pregel.py @@ -180,7 +180,7 @@ def test_graph_validation() -> None: def test_checkpoint_errors() -> None: class FaultyGetCheckpointer(MemorySaver): - def get_tuple(self, config: RunnableConfig) -> CheckpointTuple | None: + def get_tuple(self, config: RunnableConfig) -> Optional[CheckpointTuple]: raise ValueError("Faulty get_tuple") class FaultyPutCheckpointer(MemorySaver): diff --git a/tests/test_pregel_async.py b/tests/test_pregel_async.py index e5a867374..b5cfb3a80 100644 --- a/tests/test_pregel_async.py +++ b/tests/test_pregel_async.py @@ -61,7 +61,7 @@ from tests.memory_assert import ( async def test_checkpoint_errors() -> None: class FaultyGetCheckpointer(MemorySaver): - async def aget_tuple(self, config: RunnableConfig) -> CheckpointTuple | None: + async def aget_tuple(self, config: RunnableConfig) -> Optional[CheckpointTuple]: raise ValueError("Faulty get_tuple") class FaultyPutCheckpointer(MemorySaver):