Fix formatting of trailing unescaped quotes in raw triple quoted strings#6202
Merged
Fix formatting of trailing unescaped quotes in raw triple quoted strings#6202
Conversation
…ngs. **Summary** This prevents us from turning `r'''\""'''` into `r"""\"""""`, which is invalid syntax. This PR fixes CI, which is currently broken on main (in a way that still passes on linter PRs and allows merging formatter PRs, but it's bad to have a job be red). Once merged, i'll make the formatted ecosystem checks a required check. **Test Plan** Added a regression test.
Member
Author
|
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
This was referenced Jul 31, 2023
Merged
MichaReiser
reviewed
Jul 31, 2023
Comment on lines
327
to
329
| // We can't turn `r'''\""'''` into `r"""\"""""`, the last previously inner quote | ||
| // we shorten the quoted part and turn the last triple quote char into an | ||
| // unterminated string start. |
Member
There was a problem hiding this comment.
I don't understand this comment. What I understand from the code is that the match now returns true for a single quote at the end of the string. What about a triple quoted string that ends with two quotes?
'''""'''
Contributor
PR Check ResultsBenchmarkLinuxWindows |
MichaReiser
approved these changes
Jul 31, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary This prevents us from turning
r'''\""'''intor"""\""""", which is invalid syntax.This PR fixes CI, which is currently broken on main (in a way that still passes on linter PRs and allows merging formatter PRs, but it's bad to have a job be red). Once merged, i'll make the formatted ecosystem checks a required check.
Test Plan Added a regression test.