This commit is contained in:
Nuno Campos
2025-05-14 11:29:26 -07:00
parent f51e5e2bd7
commit 3acf63a918
3 changed files with 8 additions and 4 deletions
+3 -1
View File
@@ -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
+2 -2
View File
@@ -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(
+3 -1
View File
@@ -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