Skip to content

Commit f4f356b

Browse files
committed
SchemaType to dict
1 parent 999b533 commit f4f356b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sphinx_needs/schema/core.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def get_localschema_errors(
170170
return list(validator.iter_errors(instance=need))
171171

172172

173-
def get_schema_by_id(schema_id: str, schemas: list[dict[str, Any]]) -> dict[str, Any]:
173+
def get_schema_by_id(schema_id: str, schemas: list[SchemaType]) -> SchemaType:
174174
"""
175175
Resolve a schema reference by its ID.
176176
@@ -413,7 +413,7 @@ def validate_need(
413413
config=config,
414414
warnings=warnings,
415415
need=need,
416-
schema=linked_schema,
416+
schema=dict(linked_schema),
417417
rule=MessageRuleEnum.missing_target,
418418
need_path=[*need_path, link_type],
419419
schema_path=[
@@ -484,7 +484,7 @@ def validate_need(
484484
config=config,
485485
warnings=warnings,
486486
need=need,
487-
schema=linked_schema,
487+
schema=dict(linked_schema),
488488
rule=MessageRuleEnum.too_few_links,
489489
need_path=[*need_path, link_type],
490490
schema_path=[
@@ -509,7 +509,7 @@ def validate_need(
509509
config=config,
510510
warnings=warnings,
511511
need=need,
512-
schema=linked_schema,
512+
schema=dict(linked_schema),
513513
rule=MessageRuleEnum.too_many_links,
514514
need_path=[*need_path, link_type],
515515
schema_path=[
@@ -531,7 +531,7 @@ def validate_need(
531531
config=config,
532532
warnings=warnings,
533533
need=need,
534-
schema=linked_schema,
534+
schema=dict(linked_schema),
535535
rule=MessageRuleEnum.unevaluated_additional_links,
536536
need_path=[*need_path, link_type],
537537
schema_path=[

0 commit comments

Comments
 (0)