Current behavior
When setting force-sort-within-sections to true and lines-between-types to 1, Ruff adds a blank line before the first from import that appears after a straight import.
(Presumably) desired behavior
isort does not add blank lines in this situation, which I think makes sense, so I propose to stick to that behavior. I guess the force-sort-within-sections setting should simply override the lines-between-types setting.
Example
I tested isort with force_sort_within_sections and lines_between_types = 1 against the following example:
from a import x
import b
from c import y
import d
and it doesn't do anything. Here is the command I ran (isort version 5.12.0):
isort --fss --lbt 1 --stdout example.py
However, running cargo r -p ruff_cli -- check example.py --no-cache --diff adds a blank line after import b with the following config:
select = ["I001"]
[isort]
force-sort-within-sections = true
lines-between-types = 1
Current behavior
When setting force-sort-within-sections to
trueand lines-between-types to 1, Ruff adds a blank line before the first from import that appears after a straight import.(Presumably) desired behavior
isort does not add blank lines in this situation, which I think makes sense, so I propose to stick to that behavior. I guess the force-sort-within-sections setting should simply override the lines-between-types setting.
Example
I tested isort with
force_sort_within_sectionsandlines_between_types = 1against the following example:and it doesn't do anything. Here is the command I ran (isort version 5.12.0):
However, running
cargo r -p ruff_cli -- check example.py --no-cache --diffadds a blank line afterimport bwith the following config: