ruff/crates/ruff_python_formatter/tests/snapshots
Dhruv Manilawala 72bf1c2880
Preview minimal f-string formatting (#9642)
## Summary

_This is preview only feature and is available using the `--preview`
command-line flag._

With the implementation of [PEP 701] in Python 3.12, f-strings can now
be broken into multiple lines, can contain comments, and can re-use the
same quote character. Currently, no other Python formatter formats the
f-strings so there's some discussion which needs to happen in defining
the style used for f-string formatting. Relevant discussion:
https://github.com/astral-sh/ruff/discussions/9785

The goal for this PR is to add minimal support for f-string formatting.
This would be to format expression within the replacement field without
introducing any major style changes.

### Newlines

The heuristics for adding newline is similar to that of
[Prettier](https://prettier.io/docs/en/next/rationale.html#template-literals)
where the formatter would only split an expression in the replacement
field across multiple lines if there was already a line break within the
replacement field.

In other words, the formatter would not add any newlines unless they
were already present i.e., they were added by the user. This makes
breaking any expression inside an f-string optional and in control of
the user. For example,

```python
# We wouldn't break this
aaaaaaaaaaa = f"asaaaaaaaaaaaaaaaa { aaaaaaaaaaaa + bbbbbbbbbbbb + ccccccccccccccc } cccccccccc"

# But, we would break the following as there's already a newline
aaaaaaaaaaa = f"asaaaaaaaaaaaaaaaa {
	aaaaaaaaaaaa + bbbbbbbbbbbb + ccccccccccccccc } cccccccccc"
```


If there are comments in any of the replacement field of the f-string,
then it will always be a multi-line f-string in which case the formatter
would prefer to break expressions i.e., introduce newlines. For example,

```python
x = f"{ # comment
    a }"
```

### Quotes

The logic for formatting quotes remains unchanged. The existing logic is
used to determine the necessary quote char and is used accordingly.

Now, if the expression inside an f-string is itself a string like, then
we need to make sure to preserve the existing quote and not change it to
the preferred quote unless it's 3.12. For example,

```python
f"outer {'inner'} outer"

# For pre 3.12, preserve the single quote
f"outer {'inner'} outer"

# While for 3.12 and later, the quotes can be changed
f"outer {"inner"} outer"
```

But, for triple-quoted strings, we can re-use the same quote char unless
the inner string is itself a triple-quoted string.

```python
f"""outer {"inner"} outer"""  # valid
f"""outer {'''inner'''} outer"""  # preserve the single quote char for the inner string
```

### Debug expressions

If debug expressions are present in the replacement field of a f-string,
then the whitespace needs to be preserved as they will be rendered as it
is (for example, `f"{ x = }"`. If there are any nested f-strings, then
the whitespace in them needs to be preserved as well which means that
we'll stop formatting the f-string as soon as we encounter a debug
expression.

```python
f"outer {   x =  !s  :.3f}"
#                  ^^
#                  We can remove these whitespaces
```

Now, the whitespace doesn't need to be preserved around conversion spec
and format specifiers, so we'll format them as usual but we won't be
formatting any nested f-string within the format specifier.

### Miscellaneous

- The
[`hug_parens_with_braces_and_square_brackets`](https://github.com/astral-sh/ruff/issues/8279)
preview style isn't implemented w.r.t. the f-string curly braces.
- The
[indentation](https://github.com/astral-sh/ruff/discussions/9785#discussioncomment-8470590)
is always relative to the f-string containing statement

## Test Plan

* Add new test cases
* Review existing snapshot changes
* Review the ecosystem changes

[PEP 701]: https://peps.python.org/pep-0701/
2024-02-16 20:28:11 +05:30
..
black_compatibility@cases__class_blank_parentheses.py.snap Update Black Tests (#9455) 2024-01-10 12:09:34 +00:00
black_compatibility@cases__comment_after_escaped_newline.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__comments2.py.snap Set target versions in Black tests (#9221) 2023-12-21 04:20:17 +00:00
black_compatibility@cases__comments6.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__comments9.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__comments_in_blocks.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__composition.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__composition_no_trailing_comma.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__conditional_expression.py.snap Update Black Tests (#9455) 2024-01-10 12:09:34 +00:00
black_compatibility@cases__docstring_no_string_normalization.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__expression.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__fmtonoff.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__fmtonoff4.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__fmtonoff5.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__fmtpass_imports.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__fmtskip5.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__funcdef_return_type_trailing_comma.py.snap Insert trailing comma when function breaks with single argument (#8921) 2023-11-30 21:49:28 -05:00
black_compatibility@cases__function.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__function2.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__ignore_pyi.pyi.snap Enforce valid format options in spec tests (#9021) 2023-12-06 07:15:06 +00:00
black_compatibility@cases__line_ranges_diff_edge_case.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
black_compatibility@cases__line_ranges_fmt_off_decorator.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
black_compatibility@cases__long_strings_flag_disabled.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__multiline_consecutive_open_parentheses_ignore.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__nested_stub.pyi.snap Implement blank_line_after_nested_stub_class preview style (#9155) 2024-01-31 00:09:38 +05:30
black_compatibility@cases__pattern_matching_style.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__pep604_union_types_line_breaks.py.snap Update Black Tests (#9455) 2024-01-10 12:09:34 +00:00
black_compatibility@cases__pep_572_py310.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__pep_572_remove_parens.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__power_op_newline.py.snap Enforce valid format options in spec tests (#9021) 2023-12-06 07:15:06 +00:00
black_compatibility@cases__preview_allow_empty_first_line.py.snap Update Black Tests (#9455) 2024-01-10 12:09:34 +00:00
black_compatibility@cases__preview_allow_empty_first_line_in_special_cases.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_cantfit.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_comments7.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_docstring_no_string_normalization.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_form_feeds.py.snap Update Black Tests (#9455) 2024-01-10 12:09:34 +00:00
black_compatibility@cases__preview_hug_parens_with_braces_and_square_brackets.py.snap Set target versions in Black tests (#9221) 2023-12-21 04:20:17 +00:00
black_compatibility@cases__preview_hug_parens_with_braces_and_square_brackets_no_ll1.py.snap Set target versions in Black tests (#9221) 2023-12-21 04:20:17 +00:00
black_compatibility@cases__preview_long_dict_values.py.snap Set source type: Stub for black tests with options (#9674) 2024-01-29 15:54:30 +01:00
black_compatibility@cases__preview_long_strings.py.snap Preview minimal f-string formatting (#9642) 2024-02-16 20:28:11 +05:30
black_compatibility@cases__preview_long_strings__east_asian_width.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_long_strings__edge_case.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_long_strings__regression.py.snap Preview minimal f-string formatting (#9642) 2024-02-16 20:28:11 +05:30
black_compatibility@cases__preview_long_strings__type_annotations.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_multiline_strings.py.snap Preserve indent around multiline strings (#9637) 2024-01-26 08:18:30 +01:00
black_compatibility@cases__preview_pattern_matching_trailing_comma.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_percent_precedence.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__preview_prefer_rhs_split.py.snap prefer_splitting_right_hand_side_of_assignments preview style (#8943) 2023-12-13 03:43:23 +00:00
black_compatibility@cases__preview_return_annotation_brackets_string.py.snap Insert trailing comma when function breaks with single argument (#8921) 2023-11-30 21:49:28 -05:00
black_compatibility@cases__preview_single_line_format_skip_with_multiple_comments.py.snap Allow # fmt: skip with interspersed same-line comments (#9395) 2024-01-04 19:39:37 -05:00
black_compatibility@cases__raw_docstring.py.snap Implement no_blank_line_before_class_docstring preview style (#9154) 2023-12-19 00:43:20 -06:00
black_compatibility@cases__remove_await_parens.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__remove_except_parens.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__remove_for_brackets.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__return_annotation_brackets.py.snap Insert trailing comma when function breaks with single argument (#8921) 2023-11-30 21:49:28 -05:00
black_compatibility@cases__stub.pyi.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__torture.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__trailing_commas_in_leading_parts.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@cases__tupleassign.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@conditional_expression.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
black_compatibility@miscellaneous__blackd_diff.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
black_compatibility@miscellaneous__debug_visitor.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
black_compatibility@miscellaneous__force_pyi.py.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@miscellaneous__force_pyi.pyi.snap Update Black tests (#8901) 2023-11-30 00:09:55 +00:00
black_compatibility@miscellaneous__string_quotes.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
black_compatibility@raw_docstring.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
black_compatibility@simple_cases__preview_hug_parens_with_braces_and_square_brackets.py.snap Implement multiline dictionary and list hugging for preview style (#8293) 2023-11-30 21:11:14 -05:00
format@blank_line_before_class_docstring.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@carriage_return__string.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@docstring.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@docstring_code_examples.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@docstring_code_examples_crlf.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@docstring_code_examples_dynamic_line_width.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@docstring_newlines.py.snap Don't trim last empty line in docstrings (#9813) 2024-02-05 13:29:24 +00:00
format@docstring_tab_indentation.py.snap Docstring formatting: Preserve tab indentation when using indent-style=tabs (#9915) 2024-02-12 16:09:13 +01:00
format@empty_multiple_trailing_newlines.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@empty_now_newline.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@empty_trailing_newline.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@empty_whitespace.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__annotated_assign.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__attribute.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__await.py.snap Fix instability with await fluent style (#8676) 2023-11-17 12:24:19 -05:00
format@expression__binary.py.snap Fix can_omit_optional_parentheses for expressions with a right most fstring (#9124) 2023-12-14 04:58:17 +00:00
format@expression__binary_implicit_string.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__binary_pow_spacing.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__boolean_operation.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__bytes.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@expression__call.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__compare.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__dict.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__dict_comp.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__fstring.py.snap Preview minimal f-string formatting (#9642) 2024-02-16 20:28:11 +05:30
format@expression__fstring_py312.py.snap Preview minimal f-string formatting (#9642) 2024-02-16 20:28:11 +05:30
format@expression__generator_exp.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__hug.py.snap Implement multiline dictionary and list hugging for preview style (#8293) 2023-11-30 21:11:14 -05:00
format@expression__if.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__lambda.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__list.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__list_comp.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__named_expr.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__number.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__optional_parentheses_comments.py.snap prefer_splitting_right_hand_side_of_assignments preview style (#8943) 2023-12-13 03:43:23 +00:00
format@expression__set_comp.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__slice.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__split_empty_brackets.py.snap Implement multiline dictionary and list hugging for preview style (#8293) 2023-11-30 21:11:14 -05:00
format@expression__starred.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__string.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@expression__subscript.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__tuple.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__unary.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__unsplittable.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__yield.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@expression__yield_from.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__comments.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__empty_file.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__fmt_off_docstring.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@fmt_on_off__fmt_off_unclosed_deep_nested_trailing_comment.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__fmt_off_unclosed_trailing_comment.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__form_feed.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__indent.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@fmt_on_off__last_statement.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__mixed_space_and_tab.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@fmt_on_off__newlines.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__no_fmt_on.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__off_on_off_on.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__simple.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__trailing_comments.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__trailing_semicolon.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_on_off__yapf.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_skip__decorators.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_skip__docstrings.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_skip__match.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_skip__or_else.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_skip__parentheses.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_skip__reason.py.snap Allow # fmt: skip with interspersed same-line comments (#9395) 2024-01-04 19:39:37 -05:00
format@fmt_skip__trailing_semi.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@fmt_skip__type_params.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@form_feed.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@module_dangling_comment1.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@module_dangling_comment2.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@multiline_string_deviations.py.snap Hug multiline-strings preview style (#9243) 2024-01-10 12:47:34 +01:00
format@newlines.py.snap Improve dummy_implementations preview style formatting (#9240) 2023-12-22 03:44:14 +00:00
format@newlines.pyi.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@notebook_docstring.py.snap Disable top-level docstring formatting for notebooks (#9957) 2024-02-12 18:14:02 +00:00
format@parentheses__call_chains.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@parentheses__expression_parentheses_comments.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@parentheses__nested.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@parentheses__opening_parentheses_comment_empty.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@parentheses__opening_parentheses_comment_value.py.snap Insert trailing comma when function breaks with single argument (#8921) 2023-11-30 21:49:28 -05:00
format@preview.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@quote_style.py.snap Stabilize quote-style preserve (#9922) 2024-02-12 09:30:07 +00:00
format@range_formatting__ancestory.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__clause_header.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__comment_only_range.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__decorators.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__docstring_code_examples.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__empty_file.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__empty_range.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__end_of_file.py.snap Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
format@range_formatting__fmt_on_off.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__indent.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__leading_comments.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__leading_trailing_comments.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__module.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__parentheses.py.snap Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
format@range_formatting__range_narrowing.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__regressions.py.snap Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
format@range_formatting__same_line_body.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__stub.pyi.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__trailing_comments.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@range_formatting__whitespace_only_range.py.snap Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
format@skip_magic_trailing_comma.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@statement__ann_assign.py.snap Parenthesize long type annotations in annotated assignments (#9210) 2023-12-22 03:33:47 +00:00
format@statement__assert.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__assign.py.snap prefer_splitting_right_hand_side_of_assignments preview style (#8943) 2023-12-13 03:43:23 +00:00
format@statement__assignment_split_value_first.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@statement__aug_assign.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__break.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__class_definition.py.snap Implement no_blank_line_before_class_docstring preview style (#9154) 2023-12-19 00:43:20 -06:00
format@statement__delete.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__ellipsis.pyi.snap Avoid unstable formatting in ellipsis-only body with trailing comment (#8984) 2023-12-03 19:15:40 -05:00
format@statement__for.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__function.py.snap Avoid trailing comma for single-argument with positional separator (#9076) 2023-12-09 18:03:31 -05:00
format@statement__global.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__if.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__import.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__import_from.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__long_type_annotations.py.snap Parenthesize long type annotations in annotated assignments (#9210) 2023-12-22 03:33:47 +00:00
format@statement__match.py.snap Parenthesize breaking named expressions in match guards (#9396) 2024-01-08 14:47:01 +00:00
format@statement__module_comment.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__nonlocal.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__raise.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__return.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__return_annotation.py.snap Insert trailing comma when function breaks with single argument (#8921) 2023-11-30 21:49:28 -05:00
format@statement__top_level.py.snap Improve dummy_implementations preview style formatting (#9240) 2023-12-22 03:44:14 +00:00
format@statement__top_level.pyi.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__try.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__type_alias.py.snap Inline trailing comments for type alias similar to assignments (#8941) 2023-12-04 05:27:04 +00:00
format@statement__while.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@statement__with.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@statement__with_39.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@stub_files__blank_line_after_nested_stub_class.pyi.snap Implement blank_line_after_nested_stub_class preview style (#9155) 2024-01-31 00:09:38 +05:30
format@stub_files__blank_line_after_nested_stub_class_eof.pyi.snap Implement blank_line_after_nested_stub_class preview style (#9155) 2024-01-31 00:09:38 +05:30
format@stub_files__comments.pyi.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@stub_files__nesting.pyi.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@stub_files__suite.pyi.snap Implement blank_line_after_nested_stub_class preview style (#9155) 2024-01-31 00:09:38 +05:30
format@stub_files__top_level.pyi.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@tab_width.py.snap Show source-type in formatter snapshot tests with options (#9699) 2024-01-30 10:08:50 +00:00
format@trailing_comments.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00
format@trivia.py.snap Apply consistent code block labels (#8563) 2023-11-09 01:49:24 +00:00