Skip to content

isort need its own line-length configuration #3206

@KerberosMorphy

Description

@KerberosMorphy

I remove isort rules in my ruff configuration to use isort directly since it broke my config.

I use 2 line-length, 110 for black and 79 for isort. I found it easier to read my import like that.

[tool.black]
line-length = 110

[tool.isort]
line_length = 79

Based on the documentation, ruff use only a main line-length configuration to govern them all. I would really appreciate the ability to configure line-length per linter as:

isort

line-length

The line length to use when enforcing I001 violations.

Default value: Will use the tool.ruff.line-length configuration if not specified

Type: int

Example usage:

[tool.ruff.isort]
# Allow lines to be as long as 79 characters.
line-length = 79

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