From 5f84d8fdb67f3eb7edee23422005ba98c1db10cb Mon Sep 17 00:00:00 2001
From: Alexander Schlemmer <a.schlemmer@indiscale.com>
Date: Tue, 26 Nov 2024 14:16:23 +0100
Subject: [PATCH] DOC(validator): corrected docstring of validate function

---
 src/caoscrawler/validator.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/caoscrawler/validator.py b/src/caoscrawler/validator.py
index c91a5224..1663aa46 100644
--- a/src/caoscrawler/validator.py
+++ b/src/caoscrawler/validator.py
@@ -99,7 +99,7 @@ def convert_record(record: db.Record):
     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.
 
@@ -117,10 +117,9 @@ def validate(records: list[db.Record], schemas: list[dict]) -> tuple[list, list]
 
     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
-               the validation was successful.
+    - Index 0: A boolean that determines whether at least one schema matched for this record.
     - Index 1: A list of schemas matching the record at this position of the list `records`.
     """
     retval = []
-- 
GitLab