Skip to content

Ruff docs example's for [lint.isort] import-heading wrong. #23420

@vaivars

Description

@vaivars

Summary

Current docs have the example for setting import-heading as:

[lint.isort]
future = "Future imports"
standard-library = "Standard library imports"
third-party = "Third party imports"
first-party = "First party imports"
local-folder = "Local folder imports"

But it requires a dict (and actually specifying the import-heading) as:

[lint.isort]
import-heading = {
    future = "Future imports",
    standard-library = "Standard library imports",
    third-party = "Third party imports",
    first-party = "First party imports",
    local-folder = "Local folder imports",
}

for ruff.toml
or

[tool.ruff.lint.isort]
import-heading = {
    future = "Future imports",
    standard-library = "Standard library imports",
    third-party = "Third party imports",
    first-party = "First party imports",
    local-folder = "Local folder imports",
}

for pyproject.toml

Version

0.15.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions