ruff/crates/ruff_python_formatter/tests
Victor Hugo Gomes 7c5791fb77
Fix formatting of lambda star arguments (#6257)
## Summary
Previously, the ruff formatter was removing the star argument of
`lambda` expressions when formatting.

Given the following code snippet
```python
lambda *a: ()
lambda **b: ()
```
it would be formatted to
```python
lambda: ()
lambda: ()
```

We fix this by checking for the presence of `args`, `vararg` or `kwarg`
in the `lambda` expression, before we were only checking for the
presence of `args`.

Fixes #5894

## Test Plan

Add new tests cases.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2023-08-02 19:31:20 +00:00
..
snapshots Fix formatting of lambda star arguments (#6257) 2023-08-02 19:31:20 +00:00
fixtures.rs Format target: annotation = value? expressions (#5661) 2023-07-11 16:40:28 +02:00