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

Infer target version based on project metadata #3219

Merged
merged 19 commits into from Feb 1, 2023

Commits on Jan 19, 2023

  1. Copy the full SHA
    6466865 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    fe8f36f View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    6cb074d View commit details
    Browse the repository at this point in the history
  4. docs: Add CHANGES entry

    stinodego committed Jan 19, 2023
    Copy the full SHA
    7aa3158 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    50ce4f0 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    e1e71df View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    ec3c09d View commit details
    Browse the repository at this point in the history
  8. fix: Fix mypy error

    stinodego committed Jan 19, 2023
    Copy the full SHA
    f50204e View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    b9d4cfd View commit details
    Browse the repository at this point in the history
  10. Copy the full SHA
    e3ffe0c View commit details
    Browse the repository at this point in the history
  11. Merge some small functions

    stinodego committed Jan 19, 2023
    Copy the full SHA
    fbacc29 View commit details
    Browse the repository at this point in the history
  12. Add test case

    stinodego committed Jan 19, 2023
    Copy the full SHA
    3d6bf50 View commit details
    Browse the repository at this point in the history
  13. Copy the full SHA
    ac9825a View commit details
    Browse the repository at this point in the history
  14. Fix help text

    stinodego committed Jan 19, 2023
    Copy the full SHA
    ca125fd View commit details
    Browse the repository at this point in the history
  15. Copy the full SHA
    e1a4ba3 View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    e055658 View commit details
    Browse the repository at this point in the history
  17. Handle invalid specifiers

    stinodego committed Jan 19, 2023
    Copy the full SHA
    2d34eb1 View commit details
    Browse the repository at this point in the history
  18. Require packaging >=22.0

    stinodego committed Jan 19, 2023
    Copy the full SHA
    4c8393d View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Try 3.10 grammar more often + remove redundant out()

    Say you're attrs and you don't configure target-version. Previously
    Black would default to trying every single grammar it has, including the
    3.10 grammar. With this PR, now target-version is configured for you
    effectively so now get_grammars() is more selective in which grammars it
    returns. If any target versions don't support the match statement, the
    3.10 grammar won't be tried.
    
    And while in theory a 3.7+ project shoudn't be using 3.10 features,
    attrs has a test file which uses match (which fails to parse because the
    3.10 grammar isn't selected). To avoid breaking attrs, get_grammars()
    will now return the 3.10 grammar as long as *any* the target versions
    support match.
    
    The out() call was made redundant by an older PR that prints the
    configuration if --verbose is passed.
    ichard26 committed Jan 31, 2023
    Copy the full SHA
    1b5b6f4 View commit details
    Browse the repository at this point in the history