Skip to content

Commit 55a170c

Browse files
committed
Don't ignore the "ALL" rule if it is in format
In this case, the ignore will take precedence and setting `pylsp.plugins.ruff.format` to `["ALL"]` will do nothing.
1 parent 041c695 commit 55a170c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pylsp_ruff/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def pylsp_format_document(workspace: Workspace, document: Document) -> Generator
142142
# specifying `format = ["I"]` to get import sorting as part of formatting.
143143
new_text = run_ruff(
144144
settings=PluginSettings(
145-
ignore=["ALL"],
145+
ignore=["ALL"] if "ALL" not in settings.format else [],
146146
select=settings.format,
147147
executable=settings.executable,
148148
),

0 commit comments

Comments
 (0)