astral-sh/ruff

Ruff extension does not respect lines-after-imports from ruff.toml

Open

#17.558 aberto em 15 de abr. de 2025

Ver no GitHub
 (6 comments) (0 reactions) (0 assignees)Rust (2.088 forks)batch import
documentationformatterhelp wantedincompatibilityisort

Métricas do repositório

Stars
 (47.527 stars)
Métricas de merge de PR
 (Mesclagem média 3d 8h) (573 fundiu PRs em 30d)

Description

For a ruff.toml file at the root of my repo:

line-length = 120
target-version = "py311"
[lint.isort]
lines-after-imports = 1

... it appears that the setting to use a single line after the imports is ignored by the extension, resulting in the file that is formatted on save having errors according to the command line tool

I am fairly sure the file is being loaded because I am able to change the line-length parameter, restart the extension, and see matching fixes being applied.

Guia do colaborador