mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-23 11:55:10 +00:00
Rename JoinedStr
to FString
in the AST (#6379)
## Summary Per the proposal in https://github.com/astral-sh/ruff/discussions/6183, this PR renames the `JoinedStr` node to `FString`.
This commit is contained in:
parent
999d88e773
commit
3f0eea6d87
56 changed files with 166 additions and 166 deletions
|
@ -1606,38 +1606,38 @@ impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ExprFormattedValue {
|
|||
}
|
||||
}
|
||||
|
||||
impl FormatRule<ast::ExprJoinedStr, PyFormatContext<'_>>
|
||||
for crate::expression::expr_joined_str::FormatExprJoinedStr
|
||||
impl FormatRule<ast::ExprFString, PyFormatContext<'_>>
|
||||
for crate::expression::expr_f_string::FormatExprFString
|
||||
{
|
||||
#[inline]
|
||||
fn fmt(&self, node: &ast::ExprJoinedStr, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
FormatNodeRule::<ast::ExprJoinedStr>::fmt(self, node, f)
|
||||
fn fmt(&self, node: &ast::ExprFString, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
FormatNodeRule::<ast::ExprFString>::fmt(self, node, f)
|
||||
}
|
||||
}
|
||||
impl<'ast> AsFormat<PyFormatContext<'ast>> for ast::ExprJoinedStr {
|
||||
impl<'ast> AsFormat<PyFormatContext<'ast>> for ast::ExprFString {
|
||||
type Format<'a> = FormatRefWithRule<
|
||||
'a,
|
||||
ast::ExprJoinedStr,
|
||||
crate::expression::expr_joined_str::FormatExprJoinedStr,
|
||||
ast::ExprFString,
|
||||
crate::expression::expr_f_string::FormatExprFString,
|
||||
PyFormatContext<'ast>,
|
||||
>;
|
||||
fn format(&self) -> Self::Format<'_> {
|
||||
FormatRefWithRule::new(
|
||||
self,
|
||||
crate::expression::expr_joined_str::FormatExprJoinedStr::default(),
|
||||
crate::expression::expr_f_string::FormatExprFString::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ExprJoinedStr {
|
||||
impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ExprFString {
|
||||
type Format = FormatOwnedWithRule<
|
||||
ast::ExprJoinedStr,
|
||||
crate::expression::expr_joined_str::FormatExprJoinedStr,
|
||||
ast::ExprFString,
|
||||
crate::expression::expr_f_string::FormatExprFString,
|
||||
PyFormatContext<'ast>,
|
||||
>;
|
||||
fn into_format(self) -> Self::Format {
|
||||
FormatOwnedWithRule::new(
|
||||
self,
|
||||
crate::expression::expr_joined_str::FormatExprJoinedStr::default(),
|
||||
crate::expression::expr_f_string::FormatExprFString::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue