Skip to content

False positive f-string SyntaxError #7778

@youknowone

Description

@youknowone
# x.py
f"{1:{{1}.pop()}{f'n'}}"
$ ruff x.py
error: Failed to parse x.py:1:16: f-string: single '}' is not allowed
x.py:1:16: E999 SyntaxError: f-string: single '}' is not allowed
Found 1 error.
$ ruff --version
ruff 0.0.292

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingparserRelated to the parser

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions