ruff/crates/ruff_python_formatter/tests
Charlie Marsh 813d7da7ec
Respect own-line leading comments before parenthesized nodes (#6820)
## Summary

This PR ensures that if an expression has an own-line leading comment
_before_ its open parentheses, we render it as such.

For example, given:

```python
[ # foo
    # bar
    ( # baz
        1
    )
]
```

On `main`, we format as:

```python
[  # foo
    (
        # bar
        # baz
        1
    )
]
```

As of this PR, we format as:

```python
[  # foo
    # bar
    (  # baz
        1
    )
]
```

## Test Plan

`cargo test`
2023-08-25 00:18:05 -04:00
..
snapshots Respect own-line leading comments before parenthesized nodes (#6820) 2023-08-25 00:18:05 -04:00
fixtures.rs Use one line between top-level items if formatting a stub file (#6501) 2023-08-15 09:33:57 +02:00