ruff/crates/ruff_python_formatter/resources/test/fixtures/ruff
konsti 317d3dd612
Add test and basic implementation for formatter preview mode (#8044)
**Summary** Prepare for the black preview style becoming the black
stable style at the end of the year.

This adds a new test file to compare stable and preview on some relevant
preview options in black, and makes `format_dev` understand the black
preview flag. I've added poetry as a project that uses preview.

I've implemented one specific deviation (collapsing of stub
implementation in non-stub files) which showed up in poetry for testing.
This also improves poetry compatibility from 0.99891 to 0.99919.

Fixes #7440

New compatibility stats:
| project | similarity index | total files | changed files |

|----------------|------------------:|------------------:|------------------:|
| cpython | 0.75803 | 1799 | 1647 |
| django | 0.99983 | 2772 | 35 |
| home-assistant | 0.99953 | 10596 | 189 |
| poetry | 0.99919 | 317 | 12 |
| transformers | 0.99963 | 2657 | 332 |
| twine | 1.00000 | 33 | 0 |
| typeshed | 0.99978 | 3669 | 20 |
| warehouse | 0.99969 | 654 | 15 |
| zulip | 0.99970 | 1459 | 22 |
2023-10-26 15:33:26 +00:00
..
carriage_return Normalize '\r' in string literals to '\n' 2023-06-30 10:13:23 +02:00
expression Only omit optional parentheses for starting or ending with parentheses (#8238) 2023-10-26 07:28:58 +01:00
fmt_on_off Fix fmt:off with trailing child comment (#8234) 2023-10-26 01:03:34 +00:00
fmt_skip Use correct start location for class/function clause header (#7802) 2023-10-04 07:55:01 +00:00
parentheses Comments outside expression parentheses (#7873) 2023-10-19 09:24:11 +00:00
statement Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00: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 Insert newline after nested function or class statements (#7946) 2023-10-18 09:45:58 +00:00
newlines.pyi Truncate to one empty line in stub files (#7558) 2023-09-21 16:24:42 -04:00
preview.options.json Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
preview.py Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00: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 Use pass over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00