mirror of https://github.com/astral-sh/ruff
## Summary This PR fixes the bug where the formatter would panic if a class/function with decorators had a suppression comment. The fix is to use to correct start location to find the `async`/`def`/`class` keyword when decorators are present which is the end of the last decorator. ## Test Plan Add test cases for the fix and update the snapshots. |
||
|---|---|---|
| .. | ||
| comments | ||
| expression | ||
| module | ||
| other | ||
| pattern | ||
| snapshots | ||
| statement | ||
| type_param | ||
| builders.rs | ||
| cli.rs | ||
| context.rs | ||
| generated.rs | ||
| lib.rs | ||
| main.rs | ||
| options.rs | ||
| prelude.rs | ||
| verbatim.rs | ||