@@ -399,8 +399,8 @@ def validate_need(
399
399
field = link_type ,
400
400
)
401
401
return warnings
402
- needs_matching = []
403
- needs_mismatching = []
402
+ needs_matching : list [ str ] = []
403
+ needs_mismatching : list [ str ] = []
404
404
if need [link_type ]:
405
405
for link in need [link_type ]:
406
406
target_need = needs .get (link )
@@ -426,6 +426,7 @@ def validate_need(
426
426
field = link_type ,
427
427
)
428
428
continue
429
+ target_need_dict = dict (target_need )
429
430
new_schema_path = copy .deepcopy (schema_path )
430
431
new_schema_path .append (
431
432
f"{ idx } [{ linked_schema ['id' ]} ]"
@@ -439,11 +440,11 @@ def validate_need(
439
440
)
440
441
ontology_warnings = validate_need (
441
442
config = config ,
442
- need = target_need ,
443
+ need = target_need_dict ,
443
444
needs = needs ,
444
445
all_type_schemas = all_type_schemas ,
445
446
type_schemas = [cast (SchemaType , linked_schema )],
446
- need_path = [* need_path , link_type , target_need ["id" ]],
447
+ need_path = [* need_path , link_type , str ( target_need_dict ["id" ]) ],
447
448
schema_path = [
448
449
* schema_path_new ,
449
450
"link_schema" ,
@@ -460,9 +461,9 @@ def validate_need(
460
461
# user config error, abort the validation
461
462
warnings .extend (ontology_warnings )
462
463
return warnings
463
- needs_mismatching .append (target_need ["id" ])
464
+ needs_mismatching .append (str ( target_need_dict ["id" ]) )
464
465
else :
465
- needs_matching .append (target_need ["id" ])
466
+ needs_matching .append (str ( target_need_dict ["id" ]) )
466
467
cnt_matching = len (needs_matching )
467
468
cnt_mismatching = len (needs_mismatching )
468
469
if (
0 commit comments