Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inlining into f-string containing quote characters #420

Merged
merged 6 commits into from Sep 27, 2021

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