mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-07 21:25:08 +00:00
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:
parent
b00f68a23c
commit
1b813cd5f1
2 changed files with 2 additions and 2 deletions
|
@ -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
2
ruff.schema.json
generated
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue