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

known_standard_library resets the stdlib list #1368

Closed
ionelmc opened this issue Aug 3, 2020 · 3 comments
Closed

known_standard_library resets the stdlib list #1368

ionelmc opened this issue Aug 3, 2020 · 3 comments

Comments

@ionelmc
Copy link
Contributor

ionelmc commented Aug 3, 2020

If you use known_standard_library then isort simply forgets about all the other stdlib modules. It's a pretty useless option and it would only be useful if you'd fill that option with all the stdlib modules. I belive it should be additive instead, and add modules to the already known ones, instead of reseting it.

@timothycrosley
Copy link
Member

See: https://timothycrosley.github.io/isort/docs/upgrade_guides/5.0.0/#known_standard_library. You likely want to set extra_standard_library. Really neither mode should be needed as isort's standard library listing is exhaustive from Python's own documentation.

@ionelmc
Copy link
Contributor Author

ionelmc commented Aug 3, 2020

Ooof ... yeah, I just discovered extra_standard_library after diggig into the docs. I think it should be mentioned in the readme :)

@timothycrosley
Copy link
Member

Good call! I've added a mention to the readme :)

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

No branches or pull requests

2 participants