From 6e41aba91fb32e9feb741a6258eefeb9c6e4a482 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 1 Oct 2023 01:24:21 +0200 Subject: [PATCH] Use f-strings wherever possible (#3102) --- 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