-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-28002: Roundtrip f-strings with ast.unparse better #19612
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
Merged
Merged
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
cc318ee
bpo-28002: Roundtrip f-strings with ast.unparse better
4743d8d
Update Lib/ast.py
hauntsaninja 98878ba
_Unparser: make avoid_backslashes keyword only
a0a7b26
test_unparse: add test_fstring to run_always_files
0c95e56
unparse fstrings: improve cosmetics by escaping whitespace
ac49be1
unparse: add another test case
714a269
unparse: fix final quote escaping issues
85521c0
unparse: simplify, share code with docstring writing
106cdd2
Merge remote-tracking branch 'upstream/master' into astunparse
4e4a4b4
remove comment
91430f5
reduce assignments to qts
81ff3cb
use join instead of multiple replace
bd05428
use write_str_avoiding_backslashes for docstrings
cd2c107
don't use replace for backslashes
4a7037a
use isprintable
228f0b3
fix comment
debc3dd
Use American English
32d34e6
s/qts/possible_quotes/g
1fdb075
Prefix undesrscore to avoid_backslashes
c3fd073
Rename value and val
a3b48a0
Reformat string escaping
84485ab
Add a comment to visit_JoinedStr
4f32cf0
Fix line lengths
d31b376
Update comment for variable name change
428fab7
move variable from start of __init__ to end
ec38952
use global constants for quote types
b903dcf
make docstring explicit about returning a tuple
007bb4a
use kw only args
4c09b96
add escape_special_whitespace boolean argument
7735da5
use an inner function instead of a comprehension
593b0d2
add to comment when falling back to repr
fc6166f
swap the order of the iterations to save a little effort
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.