isort icon indicating copy to clipboard operation
isort copied to clipboard

How to separate `from` imports and `import` imports into distinct sections?

Open dule1322 opened this issue 10 months ago • 1 comments

I've tried using lines_between_types but this parameter seems to have no effect. I've also tried using lines_between_sections but this separates imports into separate sections depending on if the imported module is std lib, 3rd party lib, or a project level module, but it groups their from imports and import imports together. Is there any way I can achieve this?

dule1322 avatar Mar 05 '25 08:03 dule1322

Dear @dule1322, this is not an usual way to do it and I would recommend against it unless you havê a very good reason. The other separations you mentioned are recommended by multiple style guides and are industry standards.

staticdev avatar Mar 07 '25 18:03 staticdev