style(core): add ruff rules TC (#34476)

* Fixed a few TC
* Added a few Pydantic classes to
`flake8-type-checking.runtime-evaluated-base-classes` (not as much as I
would have imagined)
* Added a few `noqa: TC`
* Activated TC rules
This commit is contained in:
Christophe Bornet
2025-12-26 04:23:31 +01:00
committed by GitHub
parent 451e8496e7
commit 1f403cf612
13 changed files with 28 additions and 23 deletions

View File

@@ -8,7 +8,6 @@ import logging
import types
import typing
import uuid
from collections.abc import Mapping
from typing import (
TYPE_CHECKING,
Annotated,
@@ -35,7 +34,7 @@ from langchain_core.utils.json_schema import dereference_refs
from langchain_core.utils.pydantic import is_basemodel_subclass
if TYPE_CHECKING:
from collections.abc import Callable
from collections.abc import Callable, Mapping
from langchain_core.tools import BaseTool