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.
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 https://github.com/timothycrosley/isort/pull/843. Related https://github.com/timothycrosley/isort/issues/295.
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
awesome, thank you very much!
Most helpful comment
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