Since upgrading to 5.0.0 release, I'm getting this error:
Traceback (most recent call last):
File "/home/me/projects/proj/.tox/lint/bin/isort", line 8, in <module>
sys.exit(main())
File "/home/me/projects/proj/.tox/lint/lib/python3.8/site-packages/isort/main.py", line 651, in main
config = Config(**config_dict)
File "/home/me/projects/proj/.tox/lint/lib/python3.8/site-packages/isort/settings.py", line 309, in __init__
super().__init__(sources=tuple(sources), **combined_config) # type: ignore
TypeError: __init__() got an unexpected keyword argument 'not_skip'
My setup.cfg file contains these options for isort:
[isort]
atomic = true
default_section = THIRDPARTY
include_trailing_comma = true
known_first_party = myproject
known_third_party = pytest
line_length = 79
lines_after_imports = 2
lines_between_types = 1
multi_line_output = 3
not_skip = __init__.py
The new options readme page does not list a not_skip option, instead has skip. This is hinted to in the CHANGELOG in relation to a different change, with the line "Since there is no longer composition negative form settings (such as --dont-skip) are no longer required and have been removed."
However there is no mention in the Changelog about the removal of the not_skip option.
not_skip option is still documented in https://github.com/timothycrosley/isort/blob/master/docs/configuration/profiles.md and is present as an option here: https://github.com/timothycrosley/isort/blob/master/.editorconfig and https://github.com/timothycrosley/isort/blob/master/isort/profiles.py
And used in attrs
Correct. If you use the attrs profile you will encounter this same error.
This was automatically closed because #1272 was merged. But its only partially fixed.
Still needs to be mentioned in the changelog somewhere that not_skip was removed, and how to migrate a config which used not_skip.
I suppose this is the same for the --dont-skip CLI option?
Thanks for reporting! This is fixed in the just release 5.0.4 patch release. isort will warn people if the option is encountered and point to the upgrade guide: https://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/
Upgrade docs look great. Thanks for adding it in!