mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-28 12:35:08 +02:00
Lint
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import sys
|
||||
from collections import defaultdict, deque
|
||||
from contextvars import Context
|
||||
from functools import partial
|
||||
from hashlib import sha1
|
||||
from typing import (
|
||||
@@ -122,7 +121,7 @@ class Call:
|
||||
input: Any,
|
||||
*,
|
||||
retry: Optional[RetryPolicy],
|
||||
callbacks: Optional[Context],
|
||||
callbacks: Optional[Callbacks],
|
||||
) -> None:
|
||||
self.func = func
|
||||
self.input = input
|
||||
|
||||
@@ -65,7 +65,10 @@ class BackgroundExecutor(ContextManager):
|
||||
) -> concurrent.futures.Future[T]:
|
||||
ctx = copy_context()
|
||||
if __next_tick__:
|
||||
task = self.executor.submit(next_tick, ctx.run, fn, *args, **kwargs)
|
||||
task = cast(
|
||||
concurrent.futures.Future[T],
|
||||
self.executor.submit(next_tick, ctx.run, fn, *args, **kwargs), # type: ignore[arg-type]
|
||||
)
|
||||
else:
|
||||
task = self.executor.submit(ctx.run, fn, *args, **kwargs)
|
||||
self.tasks[task] = (__cancel_on_exit__, __reraise_on_exit__)
|
||||
|
||||
@@ -443,7 +443,6 @@ def interrupt(value: Any) -> Any:
|
||||
GraphInterrupt: On the first invocation within the node, halts execution and surfaces the provided value to the client.
|
||||
"""
|
||||
from langgraph.constants import (
|
||||
CONF,
|
||||
CONFIG_KEY_CHECKPOINT_NS,
|
||||
CONFIG_KEY_SCRATCHPAD,
|
||||
CONFIG_KEY_SEND,
|
||||
@@ -456,7 +455,7 @@ def interrupt(value: Any) -> Any:
|
||||
from langgraph.errors import GraphInterrupt
|
||||
from langgraph.utils.config import get_config
|
||||
|
||||
conf = get_config()[CONF]
|
||||
conf = get_config()["configurable"]
|
||||
# track interrupt index
|
||||
scratchpad: PregelScratchpad = conf[CONFIG_KEY_SCRATCHPAD]
|
||||
if "interrupt_counter" not in scratchpad:
|
||||
|
||||
Reference in New Issue
Block a user