Alternate quotes for strings inside f-strings in preview (#13860)

This commit is contained in:
Micha Reiser 2024-10-23 07:57:53 +02:00 committed by GitHub
parent f335fe4d4a
commit 2f88f84972
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 556 additions and 118 deletions

View file

@ -15,11 +15,13 @@ 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`.
pub(crate) fn is_f_string_formatting_enabled(context: &PyFormatContext) -> bool {
context.is_preview()
}
/// See [#13539](https://github.com/astral-sh/ruff/pull/13539)
/// Remove `Quoting` when stabalizing this preview style.
pub(crate) fn is_f_string_implicit_concatenated_string_literal_quotes_enabled(
context: &PyFormatContext,
) -> bool {