Skip to content

isort: support for from_first setting #8662

@jelmer

Description

@jelmer

isort has a from_first setting that forces "from .. import .." lines to appear before "import .." lines.

It would be great if ruff could support this too, or something like it. For example:

$ isort --ff true x.py

results in:

from __future__ import annotations

from os import path
import enum
import os

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