mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Fix normalize
arguments when fstring_formatting
is disabled (#13910)
This commit is contained in:
parent
7272f83868
commit
113ce840a6
4 changed files with 12 additions and 12 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue