---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/skip_magic_trailing_comma.py
---
## Input
```python
(
    "First entry",
    "Second entry",
    "last with trailing comma",
)

(
    "First entry",
    "Second entry",
    "last without trailing comma"
)

(
    "First entry",
    "Second entry",
    "third entry",
    "fourth entry",
    "fifth entry",
    "sixt entry",
    "seventh entry",
    "eighth entry",
)

# Regression test: Respect setting in Arguments formatting
def f(a): pass
def g(a,): pass

x1 = lambda y: 1
x2 = lambda y,: 1

# Ignore trailing comma.
with (a,):  # magic trailing comma
    ...
```

## Outputs
### Output 1
```
indent-style               = space
line-width                 = 88
indent-width               = 4
quote-style                = Double
line-ending                = LineFeed
magic-trailing-comma       = Respect
docstring-code             = Disabled
docstring-code-line-width  = "dynamic"
preview                    = Disabled
target_version             = Py38
source_type                = Python
```

```python
(
    "First entry",
    "Second entry",
    "last with trailing comma",
)

("First entry", "Second entry", "last without trailing comma")

(
    "First entry",
    "Second entry",
    "third entry",
    "fourth entry",
    "fifth entry",
    "sixt entry",
    "seventh entry",
    "eighth entry",
)


# Regression test: Respect setting in Arguments formatting
def f(a):
    pass


def g(
    a,
):
    pass


x1 = lambda y: 1
x2 = lambda y,: 1

# Ignore trailing comma.
with (
    a,
):  # magic trailing comma
    ...
```


### Output 2
```
indent-style               = space
line-width                 = 88
indent-width               = 4
quote-style                = Double
line-ending                = LineFeed
magic-trailing-comma       = Ignore
docstring-code             = Disabled
docstring-code-line-width  = "dynamic"
preview                    = Disabled
target_version             = Py38
source_type                = Python
```

```python
("First entry", "Second entry", "last with trailing comma")

("First entry", "Second entry", "last without trailing comma")

(
    "First entry",
    "Second entry",
    "third entry",
    "fourth entry",
    "fifth entry",
    "sixt entry",
    "seventh entry",
    "eighth entry",
)


# Regression test: Respect setting in Arguments formatting
def f(a):
    pass


def g(a):
    pass


x1 = lambda y: 1
x2 = lambda y,: 1

# Ignore trailing comma.
with a:  # magic trailing comma
    ...
```



