Skip to content

Inconsistent formatting with respect to back: comment in import #2358

Open
@arnaudsjs

Description

@arnaudsjs

Version isort: 6.0.0
Version black: 25.1.0

Reproductive example (formatted with isort), but incorrect according to black.

# flake8: noqa: F401
import first
# Some comment
import second

When running black on the above-mentioned snippet, it's changed to the follow:

# flake8: noqa: F401
import first

# Some comment
import second

The above-mentioned snippet is then again considered invalid by isort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions