Replace RootModel wrappers with type aliases and TypeAdapter validation (#3470)
This commit is contained in:
parent
fd66270926
commit
9972c21aa4
1 changed files with 872 additions and 1127 deletions
|
|
@ -219,6 +219,7 @@ ignore = ["PERF203"]
|
|||
|
||||
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
||||
"pydantic.RootModel".msg = "Use `pydantic.TypeAdapter` instead."
|
||||
"pydantic.root_model.RootModel".msg = "Use `pydantic.TypeAdapter` instead."
|
||||
|
||||
|
||||
[tool.ruff.lint.mccabe]
|
||||
|
|
@ -228,8 +229,8 @@ max-complexity = 24 # Default is 10
|
|||
"__init__.py" = ["F401"]
|
||||
# The mcp.types package is an alias that mirrors mcp_types namespaces by design.
|
||||
"src/mcp/types/*.py" = ["F403"]
|
||||
# Generated by scripts/gen_surface_types.py: raw datamodel-codegen output (TID251 lifts the repo-wide RootModel ban for these generated validators).
|
||||
"src/mcp-types/mcp_types/_v*/__init__.py" = ["D212", "E501", "I001", "TID251", "UP007", "UP037"]
|
||||
# Generated by scripts/gen_surface_types.py.
|
||||
"src/mcp-types/mcp_types/_v*/__init__.py" = ["D212", "E501", "I001", "UP007", "UP037"]
|
||||
"tests/server/mcpserver/test_func_metadata.py" = ["E501"]
|
||||
# Inline snapshots of the translation tool's output carry long status/prompt lines verbatim.
|
||||
"tests/docs/test_translations.py" = ["E501"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue