Remove ExprFormattedValue formatting impl (#9108)

This commit is contained in:
Dhruv Manilawala 2023-12-12 15:16:01 -06:00 committed by GitHub
parent c306f85691
commit 6c0068eeec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,24 +0,0 @@
use ruff_python_ast::AnyNodeRef;
use ruff_python_ast::ExprFormattedValue;
use crate::expression::parentheses::{NeedsParentheses, OptionalParentheses};
use crate::prelude::*;
#[derive(Default)]
pub struct FormatExprFormattedValue;
impl FormatNodeRule<ExprFormattedValue> for FormatExprFormattedValue {
fn fmt_fields(&self, _item: &ExprFormattedValue, _f: &mut PyFormatter) -> FormatResult<()> {
unreachable!("Handled inside of `FormatExprFString");
}
}
impl NeedsParentheses for ExprFormattedValue {
fn needs_parentheses(
&self,
_parent: AnyNodeRef,
_context: &PyFormatContext,
) -> OptionalParentheses {
OptionalParentheses::Multiline
}
}