diff --git a/t4_devkit/sanity/reference/ref201.py b/t4_devkit/sanity/reference/ref201.py index 25b8b756..168ebd86 100644 --- a/t4_devkit/sanity/reference/ref201.py +++ b/t4_devkit/sanity/reference/ref201.py @@ -34,5 +34,5 @@ def check(self, context: SanityContext) -> list[Reason] | None: return [ Reason(f"File not found: {record['filename']}") for record in records - if not data_root.joinpath(record["filename"]).exists() + if record.get("is_valid", True) and not data_root.joinpath(record["filename"]).exists() ] or None diff --git a/t4_devkit/sanity/reference/ref202.py b/t4_devkit/sanity/reference/ref202.py index 9fb3da5b..a0c45486 100644 --- a/t4_devkit/sanity/reference/ref202.py +++ b/t4_devkit/sanity/reference/ref202.py @@ -34,6 +34,7 @@ def check(self, context: SanityContext) -> list[Reason] | None: return [ Reason(f"File not found: {record['info_filename']}") for record in records - if record.get("info_filename") is not None + if record.get("is_valid", True) + and record.get("info_filename") is not None and not data_root.joinpath(record["info_filename"]).exists() ] or None