Point out which codes are too close

This commit is contained in:
Remi Rampin 2022-05-10 23:33:57 -04:00
parent e2b711c3a6
commit 9aa42e5ffb
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,11 @@ def _load_codes():
errored_codes = {} errored_codes = {}
for code in correct_codes: for code in correct_codes:
for error in list_errors(code): for error in list_errors(code):
if error in errored_codes:
raise ValueError("%s too close to %s" % (
code,
errored_codes[error],
))
errored_codes[error] = code errored_codes[error] = code
assert ( assert (
len(errored_codes) len(errored_codes)