Skip to content

Mismatching number of %-placeholders in string formatting #24031

@kaddkaka

Description

@kaddkaka

Summary

Incorrect number of format specifies should give error.

There are already many good warnings and tips about using f-strings. Howerever this code does not give any warnings today:

var = f"{banana}" % banana

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