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

Support google style guide #969

Closed
peteboothroyd opened this issue Jul 15, 2019 · 3 comments · Fixed by #1085
Closed

Support google style guide #969

peteboothroyd opened this issue Jul 15, 2019 · 3 comments · Fixed by #1085
Labels
enhancement New feature or request

Comments

@peteboothroyd
Copy link

The google python style guide suggests enforcing one import per line which can be achieved with the force_single_line option. However they also suggest an exception for the typing module. I can't find any way of specifying this to isort, does it exist? If not would it be much effort to implement? I imagine that a nice way of doing this would be to allow specifying certain packages as overrides for the force_single_line rule.

@BryceCicada
Copy link

The closest I've found is to use isort:skip like:

from typing import Any # isort:skip

However, isort puts these after other imports, which may not be what you need. See #843. Related #295.

@timothycrosley
Copy link
Member

This is now supported in develop and will make it's way into the 5.0.0 release:

https://github.com/timothycrosley/isort/blob/develop/isort/profiles.py#L22

Thanks!

~Timothy

@peteboothroyd
Copy link
Author

awesome, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants