mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-22 12:35:08 +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
|
@ -68,7 +68,7 @@ where
|
|||
if !matches!(
|
||||
left.as_ref(),
|
||||
Expr::Constant(_)
|
||||
| Expr::JoinedStr(_)
|
||||
| Expr::FString(_)
|
||||
| Expr::List(_)
|
||||
| Expr::Tuple(_)
|
||||
| Expr::Set(_)
|
||||
|
@ -82,7 +82,7 @@ where
|
|||
if !matches!(
|
||||
right.as_ref(),
|
||||
Expr::Constant(_)
|
||||
| Expr::JoinedStr(_)
|
||||
| Expr::FString(_)
|
||||
| Expr::List(_)
|
||||
| Expr::Tuple(_)
|
||||
| Expr::Set(_)
|
||||
|
@ -126,7 +126,7 @@ where
|
|||
Expr::BoolOp(ast::ExprBoolOp {
|
||||
values, range: _, ..
|
||||
})
|
||||
| Expr::JoinedStr(ast::ExprJoinedStr { values, range: _ }) => {
|
||||
| Expr::FString(ast::ExprFString { values, range: _ }) => {
|
||||
values.iter().any(|expr| any_over_expr(expr, func))
|
||||
}
|
||||
Expr::NamedExpr(ast::ExprNamedExpr {
|
||||
|
@ -1094,7 +1094,7 @@ impl Truthiness {
|
|||
Constant::Complex { real, imag } => Some(*real != 0.0 || *imag != 0.0),
|
||||
Constant::Ellipsis => Some(true),
|
||||
},
|
||||
Expr::JoinedStr(ast::ExprJoinedStr { values, range: _ }) => {
|
||||
Expr::FString(ast::ExprFString { values, range: _ }) => {
|
||||
if values.is_empty() {
|
||||
Some(false)
|
||||
} else if values.iter().any(|value| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue