mirror of
https://github.com/astral-sh/ruff
synced 2026-01-09 23:54:36 -05:00
[ruff] Fix false negative for empty f-strings in deque calls (RUF037) (#20109)
## Summary Fixes #20050
This commit is contained in:
@@ -1406,7 +1406,7 @@ fn is_non_empty_f_string(expr: &ast::ExprFString) -> bool {
|
||||
|
||||
/// Returns `true` if the expression definitely resolves to the empty string, when used as an f-string
|
||||
/// expression.
|
||||
fn is_empty_f_string(expr: &ast::ExprFString) -> bool {
|
||||
pub fn is_empty_f_string(expr: &ast::ExprFString) -> bool {
|
||||
fn inner(expr: &Expr) -> bool {
|
||||
match expr {
|
||||
Expr::StringLiteral(ast::ExprStringLiteral { value, .. }) => value.is_empty(),
|
||||
|
||||
Reference in New Issue
Block a user