File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ def wrapper(
197197 return
198198
199199 app_event = event .metadata .log_type .event .model_validate (
200- event .copy (update = {"records" : records }, deep = True ).model_dump ()
200+ event .model_copy (update = {"records" : records }, deep = True ).model_dump ()
201201 )
202202 with LoggingContext (
203203 aws_request_id = aws_request_id ,
Original file line number Diff line number Diff line change @@ -82,9 +82,9 @@ class RawMetadata(CorvaBaseEvent):
8282 RecordsTime = Sequence [RawTimeRecord ]
8383 RecordsDepth = Sequence [RawDepthRecord ]
8484else :
85- RecordsBase = Annotated [List [RawBaseRecord ], Field (min_items = 1 )]
86- RecordsTime = Annotated [List [RawTimeRecord ], Field (min_items = 0 )]
87- RecordsDepth = Annotated [List [RawDepthRecord ], Field (min_items = 1 )]
85+ RecordsBase = Annotated [List [RawBaseRecord ], Field (min_length = 1 )]
86+ RecordsTime = Annotated [List [RawTimeRecord ], Field (min_length = 0 )]
87+ RecordsDepth = Annotated [List [RawDepthRecord ], Field (min_length = 1 )]
8888
8989
9090class RawStreamEvent (CorvaBaseEvent , RawBaseEvent ):
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ class StreamDepthRecord(CorvaBaseEvent):
3939 RecordsTime = Sequence [StreamTimeRecord ]
4040 RecordsDepth = Sequence [StreamDepthRecord ]
4141else :
42- RecordsTime = Annotated [List [StreamTimeRecord ], Field (min_items = 1 )]
43- RecordsDepth = Annotated [List [StreamDepthRecord ], Field (min_items = 1 )]
42+ RecordsTime = Annotated [List [StreamTimeRecord ], Field (min_length = 1 )]
43+ RecordsDepth = Annotated [List [StreamDepthRecord ], Field (min_length = 1 )]
4444
4545
4646class StreamEvent (CorvaBaseEvent ):
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ def test_set_schedule_start(
254254 def app (e , api , state ):
255255 return e
256256
257- event = event .copy (update = {'schedule_start' : value })
257+ event = event .model_copy (update = {'schedule_start' : value })
258258 app_event = (
259259 type (event )
260260 .model_validate (
You can’t perform that action at this time.
0 commit comments