From 49549ff961b646ee9b99f4da3f38341e56710641 Mon Sep 17 00:00:00 2001 From: Maarten Sijm <9739541+mpsijm@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:38:09 +0100 Subject: [PATCH] [stats] Do not check test data for `TODO: Remove` comment --- bin/stats.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/stats.py b/bin/stats.py index a1a2d22bb..5dfb865c7 100644 --- a/bin/stats.py +++ b/bin/stats.py @@ -106,8 +106,8 @@ def count(path): return path(generated_testcases) results = set() for p in glob(problem.path, path): - # Exclude files containing 'TODO: Remove'. - if p.is_file(): + # Exclude files containing 'TODO: Remove'. Do not check this for test data. + if p.is_file() and p.suffix not in ['.ans', '.in', '.out']: try: data = p.read_text() except UnicodeDecodeError: @@ -117,7 +117,8 @@ def count(path): if p.is_dir(): ok = True for f in glob(p, '*'): - if f.is_file(): + # Exclude files containing 'TODO: Remove'. Do not check this for test data. + if f.is_file() and f.suffix not in ['.ans', '.in', '.out']: try: data = f.read_text() if data.find('TODO: Remove') != -1: