Skip to content
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

DRAFT: Apply pyupgrade. #51

Closed
wants to merge 3 commits into from
Closed

Commits on Jan 22, 2023

  1. 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.
    Carreau authored and akaihola committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    76b7637 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6309929 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2195e75 View commit details
    Browse the repository at this point in the history