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

Support both isort 4 and isort 5 #3725

Merged
merged 3 commits into from
Aug 18, 2020
Merged

Support both isort 4 and isort 5 #3725

merged 3 commits into from
Aug 18, 2020

Commits on Aug 18, 2020

  1. Support both isort 4 and isort 5

    The API of isort 5 (released on 2020-07-04) is completely different.
    We must still support isort 4 because isort 5 dropped the
    compatibility with Python 3.5, which pylint still supports.
    
    Note about the `known-standard-library` option: it has been included
    in pylint for years. Until now, it was mapped with the option of the
    same name in isort. However, isort 5 has changed the meaning of this
    option (see https://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/#known_standard_library).
    
    Most users of pylint want the meaning of the new
    `extra-standard-library` option. To avoid a breaking change in pylint,
    the `known-standard-library` pylint option is now mapped to
    `known-standard-library` in isort 4, and `extra-standard-library` in
    isort 5. Users that really want the _new_ meaning of
    `known-standard-library` in isort 4 must disable the
    `wrong-import-order` check in pylint and run isort manually, outside
    of pylint.
    
    Fix #3722.
    dbaty committed Aug 18, 2020
    Configuration menu
    Copy the full SHA
    03053c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    279d3c4 View commit details
    Browse the repository at this point in the history
  3. tox: Don't mention isort in dependencies

    isort is already a dependency of pylint, there is no need to mention
    it explicitly. Except for the "formatting" environment where we want
    to pin a specific version to avoid noise when a new version of
    isort is released that reports errors.
    dbaty committed Aug 18, 2020
    Configuration menu
    Copy the full SHA
    b29385c View commit details
    Browse the repository at this point in the history