ruff/crates/ruff_python_formatter/resources/test/fixtures/ruff
Charlie Marsh a6d79c03b3
Break `with` on end-of-line trailing comments (#7685)
## Summary

Ensures that:

```python
with (
    a  # comment
):
    pass
```

Retains its parentheses.

Closes https://github.com/astral-sh/ruff/issues/6750.

## Test Plan

`cargo test`
2023-09-28 00:16:40 +00:00
..
carriage_return Normalize '\r' in string literals to '\n' 2023-06-30 10:13:23 +02:00
expression Emit `LexError` for dedent to incorrect level (#7638) 2023-09-25 11:45:44 +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 Fix `fmt:skip` for function with return type (#6733) 2023-08-21 17:45:23 +02:00
parentheses Preserve parentheses around partial call chains (#7109) 2023-09-04 10:57:04 +01:00
statement Break `with` on end-of-line trailing comments (#7685) 2023-09-28 00:16:40 +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 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 Exclude pragma comments from measured line width (#7008) 2023-09-01 06:34:51 +00:00
trivia.py Correctly handle newlines after/before comments (#4895) 2023-06-07 14:49:43 +02:00