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

Removal of not_skip config option is undocumented #1271

Closed
ashleysommer opened this issue Jul 6, 2020 · 6 comments · Fixed by #1272
Closed

Removal of not_skip config option is undocumented #1271

ashleysommer opened this issue Jul 6, 2020 · 6 comments · Fixed by #1272
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@ashleysommer
Copy link

ashleysommer commented Jul 6, 2020

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

@Surgo
Copy link
Contributor

Surgo commented Jul 6, 2020

And used in attrs

@ashleysommer
Copy link
Author

Correct. If you use the attrs profile you will encounter this same error.

Surgo added a commit to Surgo/isort that referenced this issue Jul 6, 2020
timothycrosley added a commit that referenced this issue Jul 6, 2020
@ashleysommer
Copy link
Author

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.

@timothycrosley timothycrosley reopened this Jul 6, 2020
@timothycrosley timothycrosley added bug Something isn't working documentation Improvements or additions to documentation labels Jul 6, 2020
@Kriechi
Copy link

Kriechi commented Jul 6, 2020

I suppose this is the same for the --dont-skip CLI option?

@timothycrosley
Copy link
Member

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/

@ashleysommer
Copy link
Author

Upgrade docs look great. Thanks for adding it in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants