mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-09 19:27:54 +02:00
Lint
This commit is contained in:
@@ -88,7 +88,7 @@ def _coerce_state(schema: Type[Any], input: dict[str, Any]) -> dict[str, Any]:
|
||||
return schema(**input)
|
||||
|
||||
|
||||
def _update_state(input: dict[str, Any], config: RunnableConfig):
|
||||
def _update_state(input: dict[str, Any], config: RunnableConfig) -> dict[str, Any]:
|
||||
if input is not None:
|
||||
ChannelWrite.do_write(config, **input)
|
||||
return input
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
from langgraph.prebuilt.agent_executor import create_agent_executor
|
||||
from langgraph.prebuilt import chat_agent_executor
|
||||
from langgraph.prebuilt.agent_executor import create_agent_executor
|
||||
from langgraph.prebuilt.tool_executor import ToolExecutor, ToolInvocation
|
||||
|
||||
__all__ = ["create_agent_executor", "chat_agent_executor", "ToolExecutor", ToolInvocation]
|
||||
__all__ = [
|
||||
"create_agent_executor",
|
||||
"chat_agent_executor",
|
||||
"ToolExecutor",
|
||||
"ToolInvocation",
|
||||
]
|
||||
|
||||
@@ -87,7 +87,7 @@ class Channel:
|
||||
*,
|
||||
key: Optional[str] = None,
|
||||
when: Optional[Callable[[Any], bool]] = None,
|
||||
tags: Optional[Sequence[str]] = None,
|
||||
tags: Optional[list[str]] = None,
|
||||
) -> ChannelInvoke:
|
||||
...
|
||||
|
||||
@@ -99,7 +99,7 @@ class Channel:
|
||||
*,
|
||||
key: None = None,
|
||||
when: Optional[Callable[[Any], bool]] = None,
|
||||
tags: Optional[Sequence[str]] = None,
|
||||
tags: Optional[list[str]] = None,
|
||||
) -> ChannelInvoke:
|
||||
...
|
||||
|
||||
@@ -110,7 +110,7 @@ class Channel:
|
||||
*,
|
||||
key: Optional[str] = None,
|
||||
when: Optional[Callable[[Any], bool]] = None,
|
||||
tags: Optional[Sequence[str]] = None,
|
||||
tags: Optional[list[str]] = None,
|
||||
) -> ChannelInvoke:
|
||||
"""Runs process.invoke() each time channels are updated,
|
||||
with a dict of the channel values as input."""
|
||||
|
||||
@@ -90,7 +90,7 @@ class ChannelInvoke(RunnableBindingBase):
|
||||
channels: Mapping[None, str] | Mapping[str, str],
|
||||
triggers: Sequence[str],
|
||||
when: Optional[Callable[[Any], bool]] = None,
|
||||
tags: Optional[Sequence[str]] = None,
|
||||
tags: Optional[list[str]] = None,
|
||||
*,
|
||||
bound: Optional[Runnable[Any, Any]] = None,
|
||||
kwargs: Optional[Mapping[str, Any]] = None,
|
||||
|
||||
@@ -61,7 +61,7 @@ def validate_graph(
|
||||
|
||||
def validate_keys(
|
||||
keys: Union[str, Sequence[str]],
|
||||
channels: dict[str, BaseChannel],
|
||||
channels: Mapping[str, BaseChannel],
|
||||
) -> None:
|
||||
if isinstance(keys, str):
|
||||
if keys not in channels:
|
||||
|
||||
Reference in New Issue
Block a user