Skip to content

Missing the f-prefix on an f-string is hard to notice #65

Open
@Lilja

Description

@Lilja

As python 3.6 gave us f-strings it's I've been using them more over the ol' .format() syntax.

Sadly, the syntax is highlighting strings that have curly braces but have neither f-string prefix or .format suffix.

IMG

The third statement ("{hello}") shouldn't show the curly brace because that is not doing anything fancy with the string. It's just a string.

This might lead me as a developer to miss putting the f-prefix before a string, as the curly braces are giving an indication that they are treated as some sort of templates.

Any thoughts on this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions