@@ -208,7 +208,7 @@ def serialize(
208208 ): # pragma: no cover
209209 raise ValueError (
210210 "polymorphic_serialization requires Pydantic >= 2.13. "
211- f"Current version: { shared .PYDANTIC_VERSION } " # type: ignore[attr-defined] # ty: ignore[unused-ignore-comment]
211+ f"Current version: { shared .PYDANTIC_VERSION } " # type: ignore[attr-defined]
212212 )
213213 kwargs = {
214214 "mode" : mode ,
@@ -221,7 +221,7 @@ def serialize(
221221 }
222222 if shared .PYDANTIC_VERSION_MINOR_TUPLE >= (2 , 13 ):
223223 kwargs ["polymorphic_serialization" ] = polymorphic_serialization
224- return self ._type_adapter .dump_python (value , ** kwargs ) # type: ignore[arg-type]
224+ return self ._type_adapter .dump_python (value , ** kwargs ) # type: ignore[arg-type] # ty: ignore[invalid-argument-type]
225225
226226 def serialize_json (
227227 self ,
@@ -246,7 +246,7 @@ def serialize_json(
246246 ): # pragma: no cover
247247 raise ValueError (
248248 "polymorphic_serialization requires Pydantic >= 2.13. "
249- f"Current version: { shared .PYDANTIC_VERSION } " # type: ignore[attr-defined] # ty: ignore[unused-ignore-comment]
249+ f"Current version: { shared .PYDANTIC_VERSION } " # type: ignore[attr-defined]
250250 )
251251 kwargs = {
252252 "include" : include ,
@@ -258,7 +258,7 @@ def serialize_json(
258258 }
259259 if shared .PYDANTIC_VERSION_MINOR_TUPLE >= (2 , 13 ):
260260 kwargs ["polymorphic_serialization" ] = polymorphic_serialization
261- return self ._type_adapter .dump_json (value , ** kwargs ) # type: ignore[arg-type]
261+ return self ._type_adapter .dump_json (value , ** kwargs ) # type: ignore[arg-type] # ty: ignore[invalid-argument-type]
262262
263263 def __hash__ (self ) -> int :
264264 # Each ModelField is unique for our purposes, to allow making a dict from
0 commit comments