Skip to content

FURB105 should detect empty f-strings #21346

@dscorbett

Description

@dscorbett

Summary

It would be helpful for print-empty-string (FURB105) to detect empty f-strings via is_empty_f_string. Example:

$ cat >furb105.py <<'# EOF'
print(f"")
# EOF

$ ruff --isolated check furb105.py --select FURB105
All checks passed!

Version

ruff 0.14.4 (c7ff982 2025-11-06)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions