Skip to content

Detect when f-strings don't use any interpolation variables #3190

Closed
@PCManticore

Description

@PCManticore

Is your feature request related to a problem? Please describe

There is no error if a string is marked as an f-string but does not use any interpolation. e.g. f"some message" is superfluously marked as an f-string since it does not have any interpolated variables.

Describe the solution you'd like

We should emit a warning when we encounter f-strings without interpolation variables.

Additional context

Slightly related to #2507.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueFriendly and approachable by new contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions