Skip to content

Commit 631e714

Browse files
committed
improve warning
1 parent 4c50811 commit 631e714

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/problem.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,12 +941,13 @@ def validators(
941941
if print_warn:
942942
key = (cls, check_constraints)
943943
if key not in problem._validators_warn_cache:
944+
constraints_msg = " for constraints cecking" if check_constraints else ""
944945
problem._validators_warn_cache.add(key)
945946
if cls == validate.InputValidator and not validators:
946-
warn("No input validators found.")
947+
warn(f"No input validators{constraints_msg} found.")
947948
if cls == validate.AnswerValidator and not validators and not problem.interactive:
948949
# for interactive problems, the .ans file should be empty
949-
warn("No answer validators found.")
950+
warn(f"No answer validators{constraints_msg} found.")
950951

951952
build_ok = all(v.ok for v in validators)
952953

0 commit comments

Comments
 (0)