ruff/crates/ruff_python_formatter/tests/snapshots
konsti af95cbaeef
Add newline after module docstrings in preview style (#8283)
Change
```python
"""Test docstring"""
a = 1
```
to
```python
"""Test docstring"""

a = 1
```
in preview style, but don't touch the docstring otherwise.

Do we want to ask black to also format the content of module level
docstrings? Seems inconsistent to me that we change function and class
docstring indentation/contents but not module docstrings.

Fixes https://github.com/astral-sh/ruff/issues/7995
2023-10-28 01:16:50 +00:00
..
black_compatibility@conditional_expression.py.snap Don't "flatten" nested if expressions when formatting (#6996) 2023-08-30 04:11:58 +00:00
black_compatibility@miscellaneous__blackd_diff.py.snap
black_compatibility@miscellaneous__debug_visitor.py.snap
black_compatibility@miscellaneous__decorators.py.snap Insert necessary blank line between class and leading comments (#8224) 2023-10-25 20:31:59 -04:00
black_compatibility@miscellaneous__docstring_no_string_normalization.py.snap
black_compatibility@miscellaneous__docstring_preview_no_string_normalization.py.snap
black_compatibility@miscellaneous__force_pyi.py.snap Update black tests (#8278) 2023-10-27 10:44:19 +00:00
black_compatibility@miscellaneous__long_strings_flag_disabled.py.snap Comments outside expression parentheses (#7873) 2023-10-19 09:24:11 +00:00
black_compatibility@miscellaneous__power_op_newline.py.snap
black_compatibility@miscellaneous__string_quotes.py.snap Update black tests (#8278) 2023-10-27 10:44:19 +00:00
black_compatibility@py_38__pep_572_remove_parens.py.snap
black_compatibility@py_310__pattern_matching_extras.py.snap Format `PatternMatchOr` (#6905) 2023-08-28 08:09:17 +00:00
black_compatibility@py_310__pattern_matching_style.py.snap Introduce AST nodes for `PatternMatchClass` arguments (#6881) 2023-08-26 14:45:44 +00:00
black_compatibility@py_310__pep_572_py310.py.snap
black_compatibility@raw_docstring.py.snap Update black tests (#8278) 2023-10-27 10:44:19 +00:00
black_compatibility@simple_cases__comment_after_escaped_newline.py.snap
black_compatibility@simple_cases__comments2.py.snap
black_compatibility@simple_cases__comments6.py.snap Exclude pragma comments from measured line width (#7008) 2023-09-01 06:34:51 +00:00
black_compatibility@simple_cases__comments9.py.snap
black_compatibility@simple_cases__composition.py.snap Avoid parenthesizing multiline strings in binary expressions (#6973) 2023-08-30 16:03:17 +02:00
black_compatibility@simple_cases__composition_no_trailing_comma.py.snap Avoid parenthesizing multiline strings in binary expressions (#6973) 2023-08-30 16:03:17 +02:00
black_compatibility@simple_cases__docstring_preview.py.snap
black_compatibility@simple_cases__expression.py.snap Force parentheses for power operations in unary expressions (#7955) 2023-10-15 21:41:50 -04:00
black_compatibility@simple_cases__fmtonoff.py.snap Treat empty-line separated comments as trailing statement comments (#6999) 2023-08-31 20:55:05 +00:00
black_compatibility@simple_cases__fmtonoff4.py.snap
black_compatibility@simple_cases__fmtonoff5.py.snap Treat empty-line separated comments as trailing statement comments (#6999) 2023-08-31 20:55:05 +00:00
black_compatibility@simple_cases__fmtpass_imports.py.snap Treat empty-line separated comments as trailing statement comments (#6999) 2023-08-31 20:55:05 +00:00
black_compatibility@simple_cases__fmtskip5.py.snap
black_compatibility@simple_cases__function.py.snap
black_compatibility@simple_cases__function2.py.snap Insert newline after nested function or class statements (#7946) 2023-10-18 09:45:58 +00:00
black_compatibility@simple_cases__ignore_pyi.py.snap
black_compatibility@simple_cases__multiline_consecutive_open_parentheses_ignore.py.snap
black_compatibility@simple_cases__remove_await_parens.py.snap Use reserved width to include line suffix measurement (#6901) 2023-08-30 08:07:11 +00:00
black_compatibility@simple_cases__remove_except_parens.py.snap
black_compatibility@simple_cases__remove_for_brackets.py.snap
black_compatibility@simple_cases__return_annotation_brackets.py.snap
black_compatibility@simple_cases__torture.py.snap Exclude pragma comments from measured line width (#7008) 2023-09-01 06:34:51 +00:00
black_compatibility@simple_cases__trailing_commas_in_leading_parts.py.snap
black_compatibility@simple_cases__tupleassign.py.snap
format@carriage_return__string.py.snap
format@docstring.py.snap Add a test for stmt assign breaking in preview mode (#7516) 2023-09-19 16:16:40 +02:00
format@empty_multiple_trailing_newlines.py.snap Fix handling of newlines in empty files (#7473) 2023-09-18 06:08:10 +00:00
format@empty_now_newline.py.snap Fix handling of newlines in empty files (#7473) 2023-09-18 06:08:10 +00:00
format@empty_trailing_newline.py.snap Fix handling of newlines in empty files (#7473) 2023-09-18 06:08:10 +00:00
format@empty_whitespace.py.snap Fix handling of newlines in empty files (#7473) 2023-09-18 06:08:10 +00:00
format@expression__annotated_assign.py.snap
format@expression__attribute.py.snap Avoid re-parenthesizing call chains whose inner values are parenthesized (#7373) 2023-09-14 05:05:37 -04:00
format@expression__await.py.snap Respect parentheses for precedence in `await` (#7468) 2023-09-18 09:56:41 -04:00
format@expression__binary.py.snap Respect parenthesized generators in `has_own_parentheses` (#8100) 2023-10-22 19:58:25 -04:00
format@expression__binary_implicit_string.py.snap Fix panic when formatting binary expression with two implicit concatenated string operands (#7287) 2023-09-12 09:49:51 +02:00
format@expression__binary_pow_spacing.py.snap Avoid space around pow for `None`, `True` and `False` (#8189) 2023-10-25 07:24:06 +01:00
format@expression__boolean_operation.py.snap Use `pass` over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00
format@expression__bytes.py.snap Always prefer double quotes for docstrings and triple-quoted srings (#7680) 2023-09-28 15:11:33 -04:00
format@expression__call.py.snap Comments outside expression parentheses (#7873) 2023-10-19 09:24:11 +00:00
format@expression__compare.py.snap fix: Don't omit optional parentheses for subscripts (#7380) 2023-09-14 08:43:53 +00:00
format@expression__dict.py.snap Add dangling comment handling to dictionary key-value pairs (#7495) 2023-09-19 19:17:21 +00:00
format@expression__dict_comp.py.snap Add dangling comment handling to dictionary key-value pairs (#7495) 2023-09-19 19:17:21 +00:00
format@expression__fstring.py.snap Formatter quoting for f-strings with triple quotes (#7826) 2023-10-11 11:30:34 +00:00
format@expression__generator_exp.py.snap Avoid searching for bracketed comments in unparenthesized generators (#7627) 2023-09-24 02:08:44 +00:00
format@expression__if.py.snap Don't "flatten" nested if expressions when formatting (#6996) 2023-08-30 04:11:58 +00:00
format@expression__lambda.py.snap Add dangling comment handling for `lambda` expressions (#7493) 2023-09-19 15:23:51 -04:00
format@expression__list.py.snap
format@expression__list_comp.py.snap Skip over parentheses when detecting `in` keyword (#8054) 2023-10-18 19:13:58 -04:00
format@expression__named_expr.py.snap
format@expression__number.py.snap Add trailing zero between dot and exponential (#7956) 2023-10-15 21:42:00 -04:00
format@expression__set_comp.py.snap
format@expression__slice.py.snap Use `pass` over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00
format@expression__split_empty_brackets.py.snap
format@expression__starred.py.snap
format@expression__string.py.snap Always prefer double quotes for docstrings and triple-quoted srings (#7680) 2023-09-28 15:11:33 -04:00
format@expression__subscript.py.snap Avoid re-parenthesizing call chains whose inner values are parenthesized (#7373) 2023-09-14 05:05:37 -04:00
format@expression__tuple.py.snap Use reserved width to include line suffix measurement (#6901) 2023-08-30 08:07:11 +00:00
format@expression__unary.py.snap Only omit optional parentheses for starting or ending with parentheses (#8238) 2023-10-26 07:28:58 +01:00
format@expression__unsplittable.py.snap Use `pass` over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00
format@expression__yield.py.snap Avoid extra parentheses in `yield` expressions (#7444) 2023-09-16 14:46:56 -04:00
format@expression__yield_from.py.snap
format@fmt_on_off__comments.py.snap
format@fmt_on_off__empty_file.py.snap
format@fmt_on_off__fmt_off_docstring.py.snap Add a test for stmt assign breaking in preview mode (#7516) 2023-09-19 16:16:40 +02:00
format@fmt_on_off__fmt_off_unclosed_deep_nested_trailing_comment.py.snap Fix `fmt:off` with trailing child comment (#8234) 2023-10-26 01:03:34 +00:00
format@fmt_on_off__fmt_off_unclosed_trailing_comment.py.snap Fix `fmt:off` with trailing child comment (#8234) 2023-10-26 01:03:34 +00:00
format@fmt_on_off__form_feed.py.snap Insert necessary blank line between class and leading comments (#8224) 2023-10-25 20:31:59 -04:00
format@fmt_on_off__indent.py.snap Add a test for stmt assign breaking in preview mode (#7516) 2023-09-19 16:16:40 +02:00
format@fmt_on_off__last_statement.py.snap
format@fmt_on_off__mixed_space_and_tab.py.snap Add a test for stmt assign breaking in preview mode (#7516) 2023-09-19 16:16:40 +02:00
format@fmt_on_off__newlines.py.snap Treat empty-line separated comments as trailing statement comments (#6999) 2023-08-31 20:55:05 +00:00
format@fmt_on_off__no_fmt_on.py.snap
format@fmt_on_off__off_on_off_on.py.snap
format@fmt_on_off__simple.py.snap
format@fmt_on_off__trailing_comments.py.snap Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
format@fmt_on_off__yapf.py.snap
format@fmt_skip__decorators.py.snap Use correct start location for class/function clause header (#7802) 2023-10-04 07:55:01 +00:00
format@fmt_skip__docstrings.py.snap
format@fmt_skip__match.py.snap Format `PatternMatchClass` (#6860) 2023-08-25 19:03:37 +00:00
format@fmt_skip__or_else.py.snap
format@fmt_skip__parentheses.py.snap
format@fmt_skip__type_params.py.snap
format@form_feed.py.snap Treat form feed as whitespace in `SimpleTokenizer` (#7626) 2023-09-25 14:34:59 +00:00
format@module_dangling_comment1.py.snap Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
format@module_dangling_comment2.py.snap Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
format@newlines.py.snap Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
format@newlines.pyi.snap Truncate to one empty line in stub files (#7558) 2023-09-21 16:24:42 -04:00
format@parentheses__call_chains.py.snap Preserve parentheses around partial call chains (#7109) 2023-09-04 10:57:04 +01:00
format@parentheses__expression_parentheses_comments.py.snap Comments outside expression parentheses (#7873) 2023-10-19 09:24:11 +00:00
format@parentheses__nested.py.snap Bool expression comment placement (#7269) 2023-09-12 06:39:57 +00:00
format@parentheses__opening_parentheses_comment_empty.py.snap
format@parentheses__opening_parentheses_comment_value.py.snap Don't move type param opening parenthesis comment (#8163) 2023-10-24 12:02:27 +00:00
format@preview.py.snap Add newline after module docstrings in preview style (#8283) 2023-10-28 01:16:50 +00:00
format@skip_magic_trailing_comma.py.snap Add a test for stmt assign breaking in preview mode (#7516) 2023-09-19 16:16:40 +02:00
format@statement__ann_assign.py.snap Avoid introducing new parentheses in annotated assignments (#8233) 2023-10-25 22:51:50 -04:00
format@statement__assert.py.snap Allow parenthesized content exceed configured line width (#7490) 2023-09-20 08:39:25 +02:00
format@statement__assign.py.snap fix: Use BestFit layout for subscript (#7409) 2023-09-16 16:21:45 +02:00
format@statement__aug_assign.py.snap
format@statement__break.py.snap
format@statement__class_definition.py.snap Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
format@statement__delete.py.snap Use reserved width to include line suffix measurement (#6901) 2023-08-30 08:07:11 +00:00
format@statement__ellipsis.pyi.snap
format@statement__for.py.snap Use `pass` over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00
format@statement__function.py.snap Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
format@statement__global.py.snap
format@statement__if.py.snap Use `pass` over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00
format@statement__import.py.snap Remove spaces from import statements (#7859) 2023-10-11 11:35:41 +00:00
format@statement__import_from.py.snap Remove spaces from import statements (#7859) 2023-10-11 11:35:41 +00:00
format@statement__match.py.snap Fix range of unparenthesized tuple subject in match statement (#8101) 2023-10-22 19:58:33 -04:00
format@statement__module_comment.py.snap Fix dangling module comments (#7456) 2023-09-17 14:56:41 +00:00
format@statement__nonlocal.py.snap
format@statement__raise.py.snap
format@statement__return.py.snap Use optional parentheses for tuples in return statements (#6875) 2023-08-29 08:30:05 +02:00
format@statement__return_annotation.py.snap Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
format@statement__top_level.py.snap Add test and basic implementation for formatter preview mode (#8044) 2023-10-26 15:33:26 +00:00
format@statement__top_level.pyi.snap
format@statement__try.py.snap Use `pass` over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00
format@statement__type_alias.py.snap Don't move type param opening parenthesis comment (#8163) 2023-10-24 12:02:27 +00:00
format@statement__while.py.snap Use `pass` over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00
format@statement__with.py.snap Comments outside expression parentheses (#7873) 2023-10-19 09:24:11 +00:00
format@stub_files__comments.pyi.snap Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
format@stub_files__nesting.pyi.snap Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
format@stub_files__suite.pyi.snap Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
format@stub_files__top_level.pyi.snap Format empty lines in stub files like black's preview style (#7206) 2023-09-11 08:03:59 +00:00
format@tab_width.py.snap Add a test for stmt assign breaking in preview mode (#7516) 2023-09-19 16:16:40 +02:00
format@trailing_comments.py.snap Extend pragma comment cases (#7687) 2023-09-28 18:55:19 +00:00
format@trivia.py.snap Use `pass` over ellipsis in non-function/class contexts (#8049) 2023-10-19 11:11:17 +02:00