Skip to content

formatter should change f strings using single quotes with nested double quotes to use double quotes when target-version is py312 #13237

@DetachHead

Description

@DetachHead

on older python versions, the following code is a syntax error:

f"{""}"

which is why the formatter does not convert the following f string to use double quotes:

f'{""}'

but on python 3.12, it's allowed, so the formatter should always convert them to double quotes. playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingformatterRelated to the formatterpreviewRelated to preview mode features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions