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

Updates to support isort 5.0 #70

Merged
merged 5 commits into from Jul 14, 2020
Merged

Updates to support isort 5.0 #70

merged 5 commits into from Jul 14, 2020

Conversation

cwdavies
Copy link
Contributor

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/

Short description explaining the high-level reason for the pull request

Checklist

  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the front end playbook
  • Passes all existing automated tests

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/
isort seems to have switched to `frozenset` for `known_standard_library`, which broke the way we're overriding it here to add `six`. This caused only `six` to be recognized as a standard library, and everything else as third-party. This is an explicit behavior change (see PyCQA/isort#1238).

We no longer use `six` so we can remove this setting
tox.ini Outdated Show resolved Hide resolved
@cwdavies cwdavies merged commit d220d83 into master Jul 14, 2020
@cwdavies cwdavies deleted the isort-updates branch July 14, 2020 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants