diff options
author | Damien Baty <damien.baty@polyconseil.fr> | 2020-07-05 23:06:04 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2020-08-18 09:12:33 +0200 |
commit | 9bc9bdf533213ba967b5199aa9f3246f08f8999c (patch) | |
tree | ed2ae7b060b5af1f051af393c7a6f1e9f4c500e7 /doc | |
parent | 707fc4603b9d505bda68cf6adf9805882b99d73c (diff) | |
download | pylint-git-9bc9bdf533213ba967b5199aa9f3246f08f8999c.tar.gz |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/whatsnew/2.6.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/whatsnew/2.6.rst b/doc/whatsnew/2.6.rst index 4da6f6122..e954199e7 100644 --- a/doc/whatsnew/2.6.rst +++ b/doc/whatsnew/2.6.rst @@ -27,3 +27,7 @@ Other Changes * `mixed-indentation` has been removed, it is no longer useful since TabError is included directly in python3 * Fix superfluous-parens false-positive for the walrus operator + +* Add support for both isort 4 and isort 5. If you have pinned isort 4 in your projet requirements, nothing changes. If you use isort 5, though, note that the `known-standard-library` option is not interpreted the same in isort 4 and isort 5 (see `the migration guide in isort documentation`_ for further details). For compatibility's sake for most pylint users, the `known-standard-library` option in pylint now maps to `extra-standard-library` in isort 5. If you really want what `known-standard-library` now means in isort 5, you must disable the `wrong-import-order` check in pylint and run isort manually with a proper isort configuration file. + +.. _the migration guide in isort documentation: https://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/#known_standard_library |