-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-38870: Expose a function to unparse an ast object in the ast module #17302
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 all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0a65c6a
bpo-38870: Expose a function to unparse an ast object in the ast module
pablogsal 1014fa8
Update what's new
pablogsal eb28c5d
Fix typo in class name
pablogsal 2d93781
Use NodeVisitor instead of handmade dispatch() method in _Unparser
isidentical 838e7ef
make _Unparser.enter a context manager and remove leave
isidentical e9434a9
Make INFSTR a private constant, add interleave as a method to _Unparser
isidentical 59f1efc
Modernize assert checks into ValueErrors, test that cases
isidentical 0b39840
Remove IO-like object API for _Unparser, convert it to node-based API
isidentical 68d1a32
Add Batuhan Taskaya as a contributor to exposing unparse
isidentical ba425c1
Modernize test_unparse with using sole pathlib instead of mixing os.path
isidentical e158d34
Instead of using super, call traverse in all items so in the future w…
isidentical fc0e8ac
test only Lib/ and Lib/test (some tests in lib2to3 is including py2)
isidentical 260cd5d
use ast.parse() for consistency in future tests
isidentical 28471e9
Add formating, simplify the test file and cosmetic changes
pablogsal 96c9aad
Rewrite some docstrings
pablogsal 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
Oops, something went wrong.
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.