Fix description of the format.skip-magic-trailing-comma example (#19095)

## Summary

This PR fixes a typo in the docs, where both variants of a config have
the same description.
This commit is contained in:
Leander Cain Slotosch 2025-07-03 16:39:59 +02:00 committed by GitHub
parent b00f68a23c
commit 1b813cd5f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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
/// ```

2
ruff.schema.json generated
View file

@ -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"