From 973b6570c777f9d53cbafd1031cbf463fe4bac41 Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Wed, 8 Oct 2025 09:04:37 +0100 Subject: [PATCH] Remove unused type ignore --- fastapi/_compat.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fastapi/_compat.py b/fastapi/_compat.py index 629664cc1..8ea5bf253 100644 --- a/fastapi/_compat.py +++ b/fastapi/_compat.py @@ -116,9 +116,7 @@ if PYDANTIC_V2: # end up building the type adapter from a model field annotation so we # need to ignore the warning: if PYDANTIC_VERSION_MINOR_TUPLE >= (2, 12): - from pydantic.warnings import ( # type: ignore[attr-defined] - UnsupportedFieldAttributeWarning, - ) + from pydantic.warnings import UnsupportedFieldAttributeWarning warnings.simplefilter( "ignore", category=UnsupportedFieldAttributeWarning