diff --git a/crates/ruff_workspace/src/options.rs b/crates/ruff_workspace/src/options.rs index a6a10a3493..f9dc3b5c9f 100644 --- a/crates/ruff_workspace/src/options.rs +++ b/crates/ruff_workspace/src/options.rs @@ -3587,7 +3587,7 @@ pub struct FormatOptions { /// Setting `skip-magic-trailing-comma = true` changes the formatting to: /// /// ```python - /// # The arguments remain on separate lines because of the trailing comma after `b` + /// # The arguments are collapsed to a single line because the trailing comma is ignored /// def test(a, b): /// pass /// ``` diff --git a/ruff.schema.json b/ruff.schema.json index dc65015dd0..0489f90b8a 100644 --- a/ruff.schema.json +++ b/ruff.schema.json @@ -1588,7 +1588,7 @@ ] }, "skip-magic-trailing-comma": { - "description": "Ruff uses existing trailing commas as an indication that short lines should be left separate. If this option is set to `true`, the magic trailing comma is ignored.\n\nFor example, Ruff leaves the arguments separate even though collapsing the arguments to a single line doesn't exceed the line length if `skip-magic-trailing-comma = false`:\n\n```python # The arguments remain on separate lines because of the trailing comma after `b` def test( a, b, ): pass ```\n\nSetting `skip-magic-trailing-comma = true` changes the formatting to:\n\n```python # The arguments remain on separate lines because of the trailing comma after `b` def test(a, b): pass ```", + "description": "Ruff uses existing trailing commas as an indication that short lines should be left separate. If this option is set to `true`, the magic trailing comma is ignored.\n\nFor example, Ruff leaves the arguments separate even though collapsing the arguments to a single line doesn't exceed the line length if `skip-magic-trailing-comma = false`:\n\n```python # The arguments remain on separate lines because of the trailing comma after `b` def test( a, b, ): pass ```\n\nSetting `skip-magic-trailing-comma = true` changes the formatting to:\n\n```python # The arguments are collapsed to a single line because the trailing comma is ignored def test(a, b): pass ```", "type": [ "boolean", "null"