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

@@ -6,7 +6,7 @@ import contextlib
import json
import typing
from abc import ABC, abstractmethod
from collections.abc import Mapping
from collections.abc import Mapping # noqa: TC003
from functools import cached_property
from pathlib import Path
from typing import (
@@ -22,7 +22,7 @@ from typing_extensions import Self, override
from langchain_core.exceptions import ErrorCode, create_message
from langchain_core.load import dumpd
from langchain_core.output_parsers.base import BaseOutputParser
from langchain_core.output_parsers.base import BaseOutputParser # noqa: TC001
from langchain_core.prompt_values import (
ChatPromptValueConcrete,
PromptValue,