Skip to content

Fix inlining into f-string containing quote characters#420

Merged
lieryan merged 6 commits intomasterfrom
lieryan-inlining-into-f-string
Sep 27, 2021
Merged

Fix inlining into f-string containing quote characters#420
lieryan merged 6 commits intomasterfrom
lieryan-inlining-into-f-string

Conversation

@lieryan
Copy link
Member

@lieryan lieryan commented Sep 27, 2021

Fix #303

Previously, if there are quotes inside f-string like so:

    s = f' test "{hello}" test'

the simplifier will match and simplify "{hello}", producing the
following simplified text:

    s = f' test "       " test'

This change fixes that and prevents simplification in f-strings, as they
may contain symbols that we need to scan for during inlining.
@lieryan lieryan added this to the 0.21.x milestone Sep 27, 2021
@lieryan lieryan self-assigned this Sep 27, 2021
@lieryan lieryan changed the title Fix inlining into f-string Fix inlining into f-string containing quote characters Sep 27, 2021
@lieryan lieryan merged commit c051d60 into master Sep 27, 2021
@lieryan lieryan deleted the lieryan-inlining-into-f-string branch September 27, 2021 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quoted curly braces identifier in f-string is not properly replaced

1 participant