Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRAFT: Function for applying pyupgrade.
Just seeing how it looks like, we would of course need to pass options in, so i'm thinking only once there is a config file; likely. So far there's just a function to call `pyupgrade` on given source code. Applying it to modified lines needs to be implemented, probably best by refactoring `_reformat_single_file()` so it can be used for different source-modifying tools. It also does use pyupgrade private internal API, and the author has explicitly stated they they were not willing to have public API beyond the CLI. We should also likely run this _before_ black; maybe even before isort ? not sure if it might remove imports... But at least it does not pass the ast unchange part.
- Loading branch information