From f0e8df7c8ce7a145f3067345b64f8a44f88297ce Mon Sep 17 00:00:00 2001 From: Craig Davies Date: Mon, 6 Jul 2020 16:05:14 -0400 Subject: [PATCH] Updates to support isort 5.0 Removed `not_skip` and `recursive` from `tox.ini` to fix TypeError: __init__() got an unexpected keyword argument 'not_skip' * recursive Prior to version 5.0.0, isort wouldn't automatically traverse directories. The --recursive option was necessary to tell it to do so. In 5.0.0 directories are automatically traversed for all Python files, and as such this option is no longer necessary and should simply be removed. * not_skip In an earlier version isort had a default skip of __init__.py. To get around that many projects wanted a way to not skip __init__.py or any other files that were automatically skipped in the future by isort. isort no longer has any default skips, so if the value here is __init__.py you can simply remove the setting. https://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/ --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 846911b..4abf218 100644 --- a/tox.ini +++ b/tox.ini @@ -33,7 +33,7 @@ deps= commands= black --check treemodeladmin setup.py flake8 . - isort --check-only --diff --recursive treemodeladmin + isort --check-only --diff treemodeladmin [flake8] ignore=E731,W503,W504 @@ -49,7 +49,6 @@ lines_after_imports=2 include_trailing_comma=1 multi_line_output=3 skip=.tox,migrations -not_skip=__init__.py use_parentheses=1 known_django=django known_wagtail=wagtail