Skip to content

Commit 7272f83

Browse files
authored
Fix preview style name in can_omit_parentheses to is_f_string_formatting_enabled (#13907)
1 parent 3eb4546 commit 7272f83

File tree

1 file changed

+4
-5
lines changed
  • crates/ruff_python_formatter/src/expression

1 file changed

+4
-5
lines changed

crates/ruff_python_formatter/src/expression/mod.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ use crate::expression::parentheses::{
2121
use crate::prelude::*;
2222
use crate::preview::{
2323
is_empty_parameters_no_unnecessary_parentheses_around_return_value_enabled,
24-
is_f_string_implicit_concatenated_string_literal_quotes_enabled,
25-
is_hug_parens_with_braces_and_square_brackets_enabled,
24+
is_f_string_formatting_enabled, is_hug_parens_with_braces_and_square_brackets_enabled,
2625
};
2726

2827
mod binary_like;
@@ -770,7 +769,7 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> {
770769
Expr::StringLiteral(ast::ExprStringLiteral { value, .. })
771770
if value.is_implicit_concatenated() =>
772771
{
773-
if !is_f_string_implicit_concatenated_string_literal_quotes_enabled(self.context) {
772+
if !is_f_string_formatting_enabled(self.context) {
774773
self.update_max_precedence(OperatorPrecedence::String);
775774
}
776775

@@ -779,14 +778,14 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> {
779778
Expr::BytesLiteral(ast::ExprBytesLiteral { value, .. })
780779
if value.is_implicit_concatenated() =>
781780
{
782-
if !is_f_string_implicit_concatenated_string_literal_quotes_enabled(self.context) {
781+
if !is_f_string_formatting_enabled(self.context) {
783782
self.update_max_precedence(OperatorPrecedence::String);
784783
}
785784

786785
return;
787786
}
788787
Expr::FString(ast::ExprFString { value, .. }) if value.is_implicit_concatenated() => {
789-
if !is_f_string_implicit_concatenated_string_literal_quotes_enabled(self.context) {
788+
if !is_f_string_formatting_enabled(self.context) {
790789
self.update_max_precedence(OperatorPrecedence::String);
791790
}
792791

0 commit comments

Comments
 (0)