Fix normalize arguments when fstring_formatting is disabled (#13910)

This commit is contained in:
Micha Reiser
2024-10-24 15:07:18 +02:00
committed by GitHub
parent 7272f83868
commit 113ce840a6
4 changed files with 12 additions and 12 deletions

View File

@@ -371,8 +371,9 @@ impl Format<PyFormatContext<'_>> for FormatLiteralContent {
0,
self.flags,
self.flags.is_f_string() && !self.is_fstring,
true,
false,
// TODO: Remove the argument from `normalize_string` when promoting the `is_f_string_formatting_enabled` preview style.
self.flags.is_f_string() && !is_f_string_formatting_enabled(f.context()),
is_f_string_formatting_enabled(f.context()),
);
// Trim the start and end of the string if it's the first or last part of a docstring.