1818
1919class MyPydanticModel (BaseModel ):
2020 ip_field : IPv4Address
21- timedelta_field : timedelta
2221 string_field_assigned_field : str = Field ()
2322 string_field_with_default : str = Field (default_factory = lambda : "my-string" )
2423 annotated_list_of_str : Annotated [
@@ -28,8 +27,6 @@ class MyPydanticModel(BaseModel):
2827
2928 def _check_instance (self ):
3029 assert isinstance (self .ip_field , IPv4Address )
31- assert isinstance (self .timedelta_field , timedelta )
32- assert self .timedelta_field == timedelta (1 , 2 , 3 , 4 , 5 , 6 , 7 )
3330 assert isinstance (self .string_field_assigned_field , str )
3431 assert isinstance (self .string_field_with_default , str )
3532 assert isinstance (self .annotated_list_of_str , list )
@@ -110,7 +107,6 @@ def make_homogeneous_list_of_pydantic_objects() -> List[MyPydanticModel]:
110107 return [
111108 MyPydanticModel (
112109 ip_field = IPv4Address ("127.0.0.1" ),
113- timedelta_field = timedelta (1 , 2 , 3 , 4 , 5 , 6 , 7 ),
114110 string_field_assigned_field = "my-string" ,
115111 annotated_list_of_str = ["my-string-1" , "my-string-2" ],
116112 str_short_sequence = ["my-string-1" , "my-string-2" ],
@@ -124,7 +120,6 @@ def make_heterogenous_list_of_pydantic_objects() -> (
124120 return [
125121 MyPydanticModel (
126122 ip_field = IPv4Address ("127.0.0.1" ),
127- timedelta_field = timedelta (1 , 2 , 3 , 4 , 5 , 6 , 7 ),
128123 string_field_assigned_field = "my-string" ,
129124 annotated_list_of_str = ["my-string-1" , "my-string-2" ],
130125 str_short_sequence = ["my-string-1" , "my-string-2" ],
0 commit comments