Skip to content

--sort-reexports does not respect --profile=black #2280

Open
@Helveg

Description

Problem

Attempting to sort a multiline __all__ attribute that is longer than the line limit with isort . --sort-reexports --profile=black wraps the lines in a non-black compatible way:

Before

__all__ = [
    "ArgumentReference",
    "ConfigurationSource",
    "HeptoFlow",
    "HeptoFlowContainer",
    "InMemoryCache",
    "Input",
    "InputReference",
    "InputValue",
    "Service",
    "parse_input_expression",
]

After

__all__ = ['ArgumentReference', 'ConfigurationSource', 'HeptoFlow', 'HeptoFlowContainer',
 'InMemoryCache', 'Input', 'InputReference', 'InputValue', 'Service',
 'parse_input_expression']

Env

Python 3.12
isort 5.13.2
black 24.4.2

PS: Very willing to fix this myself and to PR it if someone can triage this and point me in the right direction.

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