Skip to content

Commit

Permalink
[stats] Do not check test data for TODO: Remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsijm committed Mar 25, 2024
1 parent 2b7dcf9 commit 49549ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 49549ff

Please sign in to comment.