Skip to content

False positive for missing-f-string-syntax (RUF027) #21939

@ashrub-holvi

Description

@ashrub-holvi

Summary

Hi,

code:

def func():
    label = ""
    nice_label = "{label} xxx"
    return nice_label.format(label=label)

triggers missing-f-string-syntax (RUF027)
see in playground
but I guess it can be just f-string, so, perhaps UP032 can be triggered instead

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions