From d34bf7739b0fe8aaf344e3cadaacba21d5239b41 Mon Sep 17 00:00:00 2001 From: ktro2828 Date: Mon, 6 Apr 2026 12:56:17 +0900 Subject: [PATCH] feat: check sample data file only if it is valid Signed-off-by: ktro2828 --- t4_devkit/sanity/reference/ref201.py | 2 +- t4_devkit/sanity/reference/ref202.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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