Skip to content

Fix isort break the indent-width #11606

@nasyxx

Description

@nasyxx

ruff.toml

indent-width = 2

[lint]
select = ["I"]

Original

# xx.py
from math import (
  sin,
  tan,
  cos,
  nan,
  pi,
)

del sin, cos, tan, pi, nan

Run

ruff check --fix xx.py

Except sorted and 2 spaces indent imports.

from math import (
  cos,
  nan,
  pi,
  sin,
  tan,
)

del sin, cos, tan, pi, nan

Now, there are extra 2 spaces before cos, nan, ...

from math import (
    cos,
    nan,
    pi,
    sin,
    tan,
)

del sin, cos, tan, pi, nan
ruff: 0.4.5
python: 3.12.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingisortRelated to import sorting

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions