summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorDamien Baty <damien.baty@polyconseil.fr>2020-07-05 23:06:04 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2020-08-18 09:12:33 +0200
commit9bc9bdf533213ba967b5199aa9f3246f08f8999c (patch)
treeed2ae7b060b5af1f051af393c7a6f1e9f4c500e7 /tox.ini
parent707fc4603b9d505bda68cf6adf9805882b99d73c (diff)
downloadpylint-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 'tox.ini')
-rw-r--r--tox.ini4
1 files changed, 3 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index b44a200e3..31b8091ea 100644
--- a/tox.ini
+++ b/tox.ini
@@ -37,7 +37,7 @@ commands =
basepython = python3
deps =
black==19.10b0
- isort==4.3.21
+ isort==5.4.2
commands =
black --check . --exclude="tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/|venv|astroid|.tox"
isort -rc . --check-only
@@ -58,6 +58,8 @@ deps =
coverage<5.0
isort
mccabe
+ # isort 5 is not compatible with Python 3.5
+ py35: isort>=4.2.5,<5
pytest
pytest-xdist
pytest-benchmark