Skip to content

Commit

Permalink
Fix 66ec667 (#2838)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos authored Apr 26, 2023
1 parent bc52bd8 commit c55b9ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codespell_lib/tests/test_dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def test_dictionary_looping(
err = err.lower()
assert (
err not in this_err_dict
), f"error {err:!r} already exists in {short_fname}"
), f"error {err!r} already exists in {short_fname}"
rep = rep.rstrip("\n")
reps = [r.strip() for r in rep.lower().split(",")]
reps = [r for r in reps if len(r)]
Expand All @@ -298,15 +298,15 @@ def test_dictionary_looping(
# error duplication (eventually maybe we should just merge?)
for err in this_err_dict:
assert err not in other_err_dict, (
f"error {err:!r} in dictionary {short_fname} "
f"error {err!r} in dictionary {short_fname} "
f"already exists in dictionary {other_fname}"
)
# 2. check corrections in this dict against other dicts (upper)
pair = (short_fname, other_fname)
if pair not in allowed_dups:
for err in this_err_dict:
assert err not in other_err_dict, (
f"error {err:!r} in dictionary {short_fname} "
f"error {err!r} in dictionary {short_fname} "
f"already exists in dictionary {other_fname}"
)
for r in this_err_dict[err]:
Expand Down

0 comments on commit c55b9ac

Please sign in to comment.