mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-15 17:15: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
|
@ -616,7 +616,7 @@ pub struct ExprFormattedValue<'a> {
|
|||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
pub struct ExprJoinedStr<'a> {
|
||||
pub struct ExprFString<'a> {
|
||||
values: Vec<ComparableExpr<'a>>,
|
||||
}
|
||||
|
||||
|
@ -697,7 +697,7 @@ pub enum ComparableExpr<'a> {
|
|||
Compare(ExprCompare<'a>),
|
||||
Call(ExprCall<'a>),
|
||||
FormattedValue(ExprFormattedValue<'a>),
|
||||
JoinedStr(ExprJoinedStr<'a>),
|
||||
FString(ExprFString<'a>),
|
||||
Constant(ExprConstant<'a>),
|
||||
Attribute(ExprAttribute<'a>),
|
||||
Subscript(ExprSubscript<'a>),
|
||||
|
@ -865,8 +865,8 @@ impl<'a> From<&'a ast::Expr> for ComparableExpr<'a> {
|
|||
debug_text: debug_text.as_ref(),
|
||||
format_spec: format_spec.as_ref().map(Into::into),
|
||||
}),
|
||||
ast::Expr::JoinedStr(ast::ExprJoinedStr { values, range: _ }) => {
|
||||
Self::JoinedStr(ExprJoinedStr {
|
||||
ast::Expr::FString(ast::ExprFString { values, range: _ }) => {
|
||||
Self::FString(ExprFString {
|
||||
values: values.iter().map(Into::into).collect(),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue