From 433b51072bf816e11ecc215175ae480aefce7cd6 Mon Sep 17 00:00:00 2001 From: Sydney Runkle Date: Tue, 21 Apr 2026 12:51:15 -0400 Subject: [PATCH] chore(prebuilt): fix ruff lint in tool_node.py Remove unused `functools` import; drop redundant string annotation on `_INJECTED_ARGS_CACHE` (already covered by `from __future__ import annotations`). Co-Authored-By: Claude Sonnet 4.6 --- libs/prebuilt/langgraph/prebuilt/tool_node.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/prebuilt/langgraph/prebuilt/tool_node.py b/libs/prebuilt/langgraph/prebuilt/tool_node.py index 35611d318..e7b6e6d46 100644 --- a/libs/prebuilt/langgraph/prebuilt/tool_node.py +++ b/libs/prebuilt/langgraph/prebuilt/tool_node.py @@ -40,7 +40,6 @@ Typical Usage: from __future__ import annotations import asyncio -import functools import inspect import json from collections.abc import Awaitable, Callable @@ -1845,7 +1844,7 @@ def _get_injection_from_type( # Cache keyed by tool object identity. Stores (tool, result) to keep a strong # reference that prevents GC from reusing the id for a different object. -_INJECTED_ARGS_CACHE: dict[int, tuple[BaseTool, "_InjectedArgs"]] = {} +_INJECTED_ARGS_CACHE: dict[int, tuple[BaseTool, _InjectedArgs]] = {} def _get_all_injected_args(tool: BaseTool) -> _InjectedArgs: