Skip to content

Different import sorting order between isort and ruff if import is aliased. #1381

@ghuls

Description

@ghuls

Differnt import sorting order between isort and ruff if import is aliased.

# isort --profile=black input.py
$ cat /tmp/isorted_output.py
from numpy import cos, int8, int16, int32, int64
from numpy import sin as np_sin
from numpy import tan, uint8, uint16, uint32, uint64

$ ruff --select I001 --ignore F401 --fix input.py
$ cat /tmp/ruff_isorted_output.py
from numpy import cos, int8, int16, int32, int64, tan, uint8, uint16, uint32, uint64
from numpy import sin as np_sin

Metadata

Metadata

Assignees

No one assigned

    Labels

    isortRelated to import sorting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions