Skip to content
Snippets Groups Projects
Commit 5f84d8fd authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

DOC(validator): corrected docstring of validate function

parent f8119315
No related branches found
No related tags found
2 merge requests!217TST: Make NamedTemporaryFiles Windows-compatible,!201Validator that checks created records using a json schema
Pipeline #58177 passed
...@@ -99,7 +99,7 @@ def convert_record(record: db.Record): ...@@ -99,7 +99,7 @@ def convert_record(record: db.Record):
return pobj return pobj
def validate(records: list[db.Record], schemas: list[dict]) -> tuple[list, list]: def validate(records: list[db.Record], schemas: list[dict]) -> list[tuple[bool, list]]:
""" """
Validate a list of records against a list of possible JSON schemas. Validate a list of records against a list of possible JSON schemas.
...@@ -117,10 +117,9 @@ def validate(records: list[db.Record], schemas: list[dict]) -> tuple[list, list] ...@@ -117,10 +117,9 @@ def validate(records: list[db.Record], schemas: list[dict]) -> tuple[list, list]
Returns: Returns:
-------- --------
A tuple containing two elements: A list of tuples, one element for each record:
- Index 0: A list of boolean values, one for each record in `records` determining whether - Index 0: A boolean that determines whether at least one schema matched for this record.
the validation was successful.
- Index 1: A list of schemas matching the record at this position of the list `records`. - Index 1: A list of schemas matching the record at this position of the list `records`.
""" """
retval = [] retval = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment