Skip to content

Commit

Permalink
Updates to support isort 5.0
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
cwdavies committed Jul 6, 2020
1 parent af9dd68 commit f0e8df7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tox.ini
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f0e8df7

Please sign in to comment.