From 9d119fc37ee27572b629f285dea3041c175e2aac Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 30 Sep 2023 11:01:35 +0200 Subject: [PATCH] Use f-strings wherever possible --- codespell_lib/_codespell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index ae6bc37025..017a383d20 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -952,7 +952,7 @@ def parse_file( if options.write_changes and fix: changed = True - lines[i] = re.sub(r"\b%s\b" % word, fixword, lines[i]) + lines[i] = re.sub(rf"\b{word}\b", fixword, lines[i]) fixed_words.add(word) continue