mirror of https://github.com/astral-sh/ruff
## Summary
The following code was previously leading to unstable formatting:
```python
try:
try:
pass
finally:
print(1) # issue7208
except A:
pass
```
The comment would be formatted as a trailing comment of `try` which is
unstable as an end-of-line comment gets two extra whitespaces.
This was originally found in
|
||
|---|---|---|
| .. | ||
| comments | ||
| expression | ||
| module | ||
| other | ||
| pattern | ||
| snapshots | ||
| statement | ||
| builders.rs | ||
| cli.rs | ||
| context.rs | ||
| generated.rs | ||
| lib.rs | ||
| main.rs | ||
| options.rs | ||
| prelude.rs | ||
| trivia.rs | ||