@@ -653,7 +653,7 @@ def clone_objects(objects: List[PydanticModels]) -> List[PydanticModels]:
653653 fields = {}
654654 for name , f in o .model_fields .items ():
655655 fields [name ] = (f .annotation , f )
656- model = create_model (o .__class__ .__name__ , ** fields )
656+ model = create_model (o .__class__ .__name__ , ** fields ) # type: ignore
657657 new_objects .append (model (** o .model_dump (by_alias = True )))
658658 for old , new in zip (objects , new_objects ):
659659 assert old .model_dump () == new .model_dump ()
@@ -811,7 +811,8 @@ async def run(
811811 self ,
812812 input : ComplexCustomUnionType ,
813813 ) -> ComplexCustomUnionType :
814- data_classes , pydantic_objects = [], []
814+ data_classes = []
815+ pydantic_objects : List [PydanticModels ] = []
815816 for o in input :
816817 if dataclasses .is_dataclass (o ):
817818 data_classes .append (o )
@@ -824,7 +825,7 @@ async def run(
824825 pydantic_objects ,
825826 start_to_close_timeout = timedelta (minutes = 1 ),
826827 )
827- return data_classes + pydantic_objects
828+ return data_classes + pydantic_objects # type: ignore
828829
829830
830831async def test_complex_custom_union_type (client : Client ):
0 commit comments