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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 12 deletions

View file

@ -16,6 +16,8 @@ pub(crate) const fn is_hug_parens_with_braces_and_square_brackets_enabled(
/// Returns `true` if the [`f-string formatting`](https://github.com/astral-sh/ruff/issues/7594) preview style is enabled.
/// WARNING: This preview style depends on `is_f_string_implicit_concatenated_string_literal_quotes_enabled`.
/// TODO: Remove `Quoting` when promoting this preview style and convert `FormatStringPart` etc. regular `FormatWithRule` implementations.
/// TODO: Remove `format_f_string` from `normalize_string` when promoting this preview style.
pub(crate) fn is_f_string_formatting_enabled(context: &PyFormatContext) -> bool {
context.is_preview()
}