-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.Issues with the preview and unstable style. Add the name of the responsible feature in the title.
Description
Black v23.1a1
Options
--line-length=80
--safe
--preview
Input
my_dict = {"foo": "bar"}
s= f'Lorem Ipsum is simply dummy text of the printing and typesetting industry:\'{my_dict["foo"]}\''Output
INTERNAL ERROR: Black produced invalid code: f-string expression part cannot include a backslash (<unknown>, line 5). Please report a bug on https://github.com/psf/black/issues. This invalid output might be helpful: /tmp/blk_5qbr6zhy.log
File "src/black/__init__.py", line 1324, in assert_equivalent
File "src/black/parsing.py", line 183, in parse_ast
my_dict = {"foo": "bar"}
s = (
"Lorem Ipsum is simply dummy text of the printing and typesetting"
f" industry:'{my_dict[\"foo\"]}'"
)Expected
my_dict = {"foo": "bar"}
s = (
"Lorem Ipsum is simply dummy text of the printing and typesetting"
f" industry:'{my_dict['foo']}'"
)Metadata
Metadata
Assignees
Labels
C: preview styleIssues with the preview and unstable style. Add the name of the responsible feature in the title.Issues with the preview and unstable style. Add the name of the responsible feature in the title.