ruff/crates/ruff_python_formatter/resources/test/fixtures/ruff
Dhruv Manilawala a1509dfc7c
Use correct start location for class/function clause header (#7802)
## 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.
2023-10-04 07:55:01 +00:00
..
carriage_return Normalize '\r' in string literals to '\n' 2023-06-30 10:13:23 +02:00
expression Attach dangling comments to the comprehension instead of the if or iter nodes (#7693) 2023-09-29 10:45:01 +01:00
fmt_on_off Add most formatter options to ruff.toml / pyproject.toml (#7566) 2023-09-22 15:47:57 +00:00
fmt_skip Use correct start location for class/function clause header (#7802) 2023-10-04 07:55:01 +00:00
parentheses Preserve parentheses around partial call chains (#7109) 2023-09-04 10:57:04 +01:00
statement Avoid printing continuations within import identifiers (#7744) 2023-10-02 09:51:07 -04:00
stub_files Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
.editorconfig Indent statements in suppressed ranges (#6507) 2023-08-15 08:00:35 +02:00
docstring.options.json Add most formatter options to ruff.toml / pyproject.toml (#7566) 2023-09-22 15:47:57 +00:00
docstring.py Format docstrings (#6452) 2023-08-14 12:28:58 +00:00
empty_multiple_trailing_newlines.py Fix handling of newlines in empty files (#7473) 2023-09-18 06:08:10 +00:00
empty_now_newline.py Fix handling of newlines in empty files (#7473) 2023-09-18 06:08:10 +00:00
empty_trailing_newline.py Fix handling of newlines in empty files (#7473) 2023-09-18 06:08:10 +00:00
empty_whitespace.py Fix handling of newlines in empty files (#7473) 2023-09-18 06:08:10 +00:00
form_feed.py Treat form feed as whitespace in SimpleTokenizer (#7626) 2023-09-25 14:34:59 +00:00
module_dangling_comment1.py Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
module_dangling_comment2.py Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
newlines.py Treat empty-line separated comments as trailing statement comments (#6999) 2023-08-31 20:55:05 +00:00
newlines.pyi Truncate to one empty line in stub files (#7558) 2023-09-21 16:24:42 -04:00
skip_magic_trailing_comma.options.json Add tests for skip magic trailing comma 2023-06-26 14:15:55 +02:00
skip_magic_trailing_comma.py Improve with statement comment handling and expression breaking (#6621) 2023-08-18 03:30:38 +00:00
tab_width.options.json Introduce IndentWidth (#7301) 2023-09-13 14:52:24 +02:00
tab_width.py Introduce IndentWidth (#7301) 2023-09-13 14:52:24 +02:00
trailing_comments.py Extend pragma comment cases (#7687) 2023-09-28 18:55:19 +00:00
trivia.py Correctly handle newlines after/before comments (#4895) 2023-06-07 14:49:43 +02:00