bpo-39290: Add support for import_as_names for traverse_imports by isidentical · Pull Request #17944 · python/cpython
Could you also add a test for this?
(Note: the suggested reviewers were autoselected by the import keyword, and might not know too much about this part of the stdlib. Adding Benjamin as the lib2to3 expert.)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.
Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.
This is a nice to have feature for outside usages but unfortunately, the current test suite doesn't offer a direct way to test it with the given interface of fixers.
Also, I am now reconsidering if this suits the concept of lib2to3 fixers and their public utilities. @benjaminp what do you think about supporting these symbols in the fixer for outside usages (e.g: packages like unimport) ?
[closing as this was an nice-to-have enhancement, and lib2to3 will be deprecated soon and this will probably not going to be in time for 3.9]
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