ruff/crates/ruff_python_formatter/src/comments
Dhruv Manilawala e62e245c61
Add support for PEP 701 (#7376)
## Summary

This PR adds support for PEP 701 in Ruff. This is a rollup PR of all the
other individual PRs. The separate PRs were created for logic separation
and code reviews. Refer to each pull request for a detail description on
the change.

Refer to the PR description for the list of pull requests within this PR.

## Test Plan

### Formatter ecosystem checks

Explanation for the change in ecosystem check:
https://github.com/astral-sh/ruff/pull/7597#issue-1908878183

#### `main`

```
| project      | similarity index  | total files       | changed files     |
|--------------|------------------:|------------------:|------------------:|
| cpython      |           0.76083 |              1789 |              1631 |
| django       |           0.99983 |              2760 |                36 |
| transformers |           0.99963 |              2587 |               319 |
| twine        |           1.00000 |                33 |                 0 |
| typeshed     |           0.99983 |              3496 |                18 |
| warehouse    |           0.99967 |               648 |                15 |
| zulip        |           0.99972 |              1437 |                21 |
```

#### `dhruv/pep-701`

```
| project      | similarity index  | total files       | changed files     |
|--------------|------------------:|------------------:|------------------:|
| cpython      |           0.76051 |              1789 |              1632 |
| django       |           0.99983 |              2760 |                36 |
| transformers |           0.99963 |              2587 |               319 |
| twine        |           1.00000 |                33 |                 0 |
| typeshed     |           0.99983 |              3496 |                18 |
| warehouse    |           0.99967 |               648 |                15 |
| zulip        |           0.99972 |              1437 |                21 |
```
2023-09-29 02:55:39 +00:00
..
snapshots Fix dangling module comments (#7456) 2023-09-17 14:56:41 +00:00
debug.rs Use CommentRanges in backwards lexing (#7360) 2023-09-16 03:21:45 +00:00
format.rs Extend pragma comment cases (#7687) 2023-09-28 18:55:19 +00:00
map.rs Use single lookup for leading, dangling, and trailing comments (#6589) 2023-08-15 17:39:45 +02:00
mod.rs Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
node_key.rs Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
placement.rs Avoid searching for bracketed comments in unparenthesized generators (#7627) 2023-09-24 02:08:44 +00:00
visitor.rs Use CommentRanges in backwards lexing (#7360) 2023-09-16 03:21:45 +00:00