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:
Charlie Marsh 2023-08-07 13:33:17 -04:00 committed by GitHub
parent 999d88e773
commit 3f0eea6d87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 166 additions and 166 deletions

View file

@ -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(),
})
}