From 53038f5f3bc531d7de80e668e9b63ba47b521cba Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 26 Apr 2023 16:08:47 +0300 Subject: [PATCH] Fix 66ec667 I had tried to change string formatting from format() to f-strings. In f-strings explicit conversion flags are placed before the format specifier: https://peps.python.org/pep-3101/#explicit-conversion-flag --- codespell_lib/tests/test_dictionary.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codespell_lib/tests/test_dictionary.py b/codespell_lib/tests/test_dictionary.py index 21e84a85c6..a81643ec36 100644 --- a/codespell_lib/tests/test_dictionary.py +++ b/codespell_lib/tests/test_dictionary.py @@ -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)] @@ -298,7 +298,7 @@ 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) @@ -306,7 +306,7 @@ def test_dictionary_looping( 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]: