Isort: Ability to add newline between normal import and from import

Created on 2 Feb 2017  路  4Comments  路  Source: PyCQA/isort

It is often desirable to separate the two import styles with a newline.

I realize that there is no option to tune that functionality. Can this be added to isort? If yes, I am ready to submit a patch.

import module

from module import ClassName
question

All 4 comments

I think lines_between_types=1 does what you want

@jaap3 is correct,

Thanks!

~Timothy

The lines_between_types option doesn't seem to be documented however.

Things have since changed, for any future visitors:

  • lines_between_sections=0
  • on the CLI 4.3.4 the flag -lbt does nothing (looks like it hasn't been updated)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ionelmc picture ionelmc  路  3Comments

jack1142 picture jack1142  路  3Comments

johnthagen picture johnthagen  路  3Comments

jedie picture jedie  路  3Comments

whg517 picture whg517  路  3Comments