diff --git a/libs/langgraph/langgraph/pregel/loop.py b/libs/langgraph/langgraph/pregel/loop.py index a10c06d72..2f0cae569 100644 --- a/libs/langgraph/langgraph/pregel/loop.py +++ b/libs/langgraph/langgraph/pregel/loop.py @@ -1079,7 +1079,9 @@ class SyncPregelLoop(PregelLoop, AbstractContextManager): matched.append(task) return matched - def accept_push(self, task, write_idx, call=None): + def accept_push( + self, task: PregelExecutableTask, write_idx: int, call: Optional[Call] = None + ) -> Optional[PregelExecutableTask]: if pushed := super().accept_push(task, write_idx, call): self.match_cached_writes() return pushed diff --git a/libs/langgraph/langgraph/pregel/runner.py b/libs/langgraph/langgraph/pregel/runner.py index a956b72b2..96a256ad9 100644 --- a/libs/langgraph/langgraph/pregel/runner.py +++ b/libs/langgraph/langgraph/pregel/runner.py @@ -539,7 +539,7 @@ def _call( # schedule PUSH tasks, collect futures scratchpad: PregelScratchpad = task().config[CONF][CONFIG_KEY_SCRATCHPAD] # type: ignore[union-attr] # schedule the next task, if the callback returns one - if next_task := schedule_task( # type: ignore[misc] + if next_task := schedule_task( task(), # type: ignore[arg-type] scratchpad.call_counter(), Call(func, input, retry=retry, cache_policy=cache_policy, callbacks=callbacks), @@ -677,7 +677,7 @@ async def _acall_impl( # schedule PUSH tasks, collect futures scratchpad: PregelScratchpad = task().config[CONF][CONFIG_KEY_SCRATCHPAD] # type: ignore[union-attr] # schedule the next task, if the callback returns one - if next_task := await schedule_task( # type: ignore[misc] + if next_task := await schedule_task( task(), # type: ignore[arg-type] scratchpad.call_counter(), Call( diff --git a/libs/langgraph/tests/test_remote_graph.py b/libs/langgraph/tests/test_remote_graph.py index 1358e6f25..82e5d27f1 100644 --- a/libs/langgraph/tests/test_remote_graph.py +++ b/libs/langgraph/tests/test_remote_graph.py @@ -863,7 +863,9 @@ async def test_ainvoke(): assert result == {"messages": [{"type": "human", "content": "world"}]} -@pytest.mark.skip("Unskip this test to manually test the LangGraph Platform integration") +@pytest.mark.skip( + "Unskip this test to manually test the LangGraph Platform integration" +) @pytest.mark.anyio async def test_langgraph_cloud_integration(): from langgraph_sdk.client import get_client, get_sync_client