Skip to content

E231 (probably others): python3.12+ f-string false positives #1145

Closed
@asottile

Description

@asottile

now that f-strings are tokenized there's quite a few false positives. I haven't done too much digging yet but this seems to be easiest one to reproduce:

f'hello:{hi}'
t.py:1:8: E231 missing whitespace after ':'

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