ruff/crates/ruff_python_formatter/tests/snapshots
Luc Khai Hai b866cbb33d
Improve slice formatting (#5922)
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

- Remove space when start of slice is empty
- Treat unary op except `not` as simple expression

## Test Plan

Add some simple tests for unary op expressions in slice

Closes #5673
2023-07-20 15:05:18 +00:00
..
black_compatibility@conditional_expression.py.snap Format expr generator exp (#5804) 2023-07-19 13:01:58 +02:00
black_compatibility@miscellaneous__blackd_diff.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@miscellaneous__debug_visitor.py.snap Formatter: Better f-string dummy (#5730) 2023-07-13 09:27:25 +00:00
black_compatibility@miscellaneous__decorators.py.snap Format ExpressionStarred nodes (#5654) 2023-07-11 06:08:08 +00:00
black_compatibility@miscellaneous__docstring_no_string_normalization.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@miscellaneous__docstring_preview_no_string_normalization.py.snap Formatter: Better f-string dummy (#5730) 2023-07-13 09:27:25 +00:00
black_compatibility@miscellaneous__force_pyi.py.snap Format target: annotation = value? expressions (#5661) 2023-07-11 16:40:28 +02:00
black_compatibility@miscellaneous__long_strings_flag_disabled.py.snap Format assert statement (#5168) 2023-07-14 09:01:33 +02:00
black_compatibility@miscellaneous__power_op_newline.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@miscellaneous__string_quotes.py.snap Formatter: Better f-string dummy (#5730) 2023-07-13 09:27:25 +00:00
black_compatibility@py_36__numeric_literals.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@py_36__numeric_literals_skip_underscores.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@py_38__pep_570.py.snap Format lambda expression (#5806) 2023-07-19 11:47:56 +00:00
black_compatibility@py_38__pep_572.py.snap Format lambda expression (#5806) 2023-07-19 11:47:56 +00:00
black_compatibility@py_38__python38.py.snap Format target: annotation = value? expressions (#5661) 2023-07-11 16:40:28 +02:00
black_compatibility@py_39__pep_572_py39.py.snap Format SetComp (#5774) 2023-07-15 15:50:47 +01:00
black_compatibility@py_39__python39.py.snap Format named expressions (walrus operator) (#5642) 2023-07-10 12:32:15 +00:00
black_compatibility@py_310__pattern_matching_complex.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@py_310__pattern_matching_extras.py.snap Format target: annotation = value? expressions (#5661) 2023-07-11 16:40:28 +02:00
black_compatibility@py_310__pattern_matching_generic.py.snap Format expr generator exp (#5804) 2023-07-19 13:01:58 +02:00
black_compatibility@py_310__pattern_matching_simple.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@py_310__pattern_matching_style.py.snap Don't add a magic trailing comma for a single entry (#5463) 2023-07-03 21:48:44 +02:00
black_compatibility@py_310__pep_572_py310.py.snap Format expr generator exp (#5804) 2023-07-19 13:01:58 +02:00
black_compatibility@py_310__remove_newline_after_match.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@py_312__type_aliases.py.snap Type alias stub for formatter (#5880) 2023-07-19 17:28:07 +02:00
black_compatibility@py_312__type_params.py.snap Type alias stub for formatter (#5880) 2023-07-19 17:28:07 +02:00
black_compatibility@simple_cases__attribute_access_on_number_literals.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__class_methods_new_line.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__comment_after_escaped_newline.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__comments2.py.snap Type alias stub for formatter (#5880) 2023-07-19 17:28:07 +02:00
black_compatibility@simple_cases__comments4.py.snap Pass parent to NeedsParentheses (#5708) 2023-07-13 08:57:29 +02:00
black_compatibility@simple_cases__comments6.py.snap Format ExpressionStarred nodes (#5654) 2023-07-11 06:08:08 +00:00
black_compatibility@simple_cases__comments9.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__comments_non_breaking_space.py.snap Format import statements (#5493) 2023-07-04 07:07:20 +00:00
black_compatibility@simple_cases__composition.py.snap Format assert statement (#5168) 2023-07-14 09:01:33 +02:00
black_compatibility@simple_cases__composition_no_trailing_comma.py.snap Format assert statement (#5168) 2023-07-14 09:01:33 +02:00
black_compatibility@simple_cases__docstring.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__docstring_preview.py.snap Formatter: Better f-string dummy (#5730) 2023-07-13 09:27:25 +00:00
black_compatibility@simple_cases__empty_lines.py.snap Format assert statement (#5168) 2023-07-14 09:01:33 +02:00
black_compatibility@simple_cases__expression.py.snap Improve slice formatting (#5922) 2023-07-20 15:05:18 +00:00
black_compatibility@simple_cases__fmtonoff.py.snap Improve slice formatting (#5922) 2023-07-20 15:05:18 +00:00
black_compatibility@simple_cases__fmtonoff2.py.snap Format assert statement (#5168) 2023-07-14 09:01:33 +02:00
black_compatibility@simple_cases__fmtonoff3.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__fmtonoff4.py.snap Don't add a magic trailing comma for a single entry (#5463) 2023-07-03 21:48:44 +02:00
black_compatibility@simple_cases__fmtonoff5.py.snap Pass parent to NeedsParentheses (#5708) 2023-07-13 08:57:29 +02:00
black_compatibility@simple_cases__fmtskip.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__fmtskip2.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__fmtskip3.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__fmtskip5.py.snap Improve comprehension line break beheavior 2023-07-11 16:51:24 +02:00
black_compatibility@simple_cases__fmtskip7.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__fmtskip8.py.snap Format AsyncFor (#5808) 2023-07-17 10:38:59 +02:00
black_compatibility@simple_cases__fstring.py.snap Formatter: Better f-string dummy (#5730) 2023-07-13 09:27:25 +00:00
black_compatibility@simple_cases__function.py.snap Improve slice formatting (#5922) 2023-07-20 15:05:18 +00:00
black_compatibility@simple_cases__function2.py.snap Format import statements (#5493) 2023-07-04 07:07:20 +00:00
black_compatibility@simple_cases__ignore_pyi.py.snap Type alias stub for formatter (#5880) 2023-07-19 17:28:07 +02:00
black_compatibility@simple_cases__import_spacing.py.snap Format import statements (#5493) 2023-07-04 07:07:20 +00:00
black_compatibility@simple_cases__multiline_consecutive_open_parentheses_ignore.py.snap Type alias stub for formatter (#5880) 2023-07-19 17:28:07 +02:00
black_compatibility@simple_cases__power_op_spacing.py.snap Format lambda expression (#5806) 2023-07-19 11:47:56 +00:00
black_compatibility@simple_cases__remove_await_parens.py.snap Parenthesize with statements (#5758) 2023-07-15 16:03:09 +01:00
black_compatibility@simple_cases__remove_except_parens.py.snap Format raise statement (#5595) 2023-07-10 21:23:49 +02:00
black_compatibility@simple_cases__remove_for_brackets.py.snap Format lambda expression (#5806) 2023-07-19 11:47:56 +00:00
black_compatibility@simple_cases__remove_newline_after_code_block_open.py.snap Formatter: Better f-string dummy (#5730) 2023-07-13 09:27:25 +00:00
black_compatibility@simple_cases__remove_parens.py.snap Format DictComp expression (#5771) 2023-07-15 17:35:23 +01:00
black_compatibility@simple_cases__return_annotation_brackets.py.snap Format target: annotation = value? expressions (#5661) 2023-07-11 16:40:28 +02:00
black_compatibility@simple_cases__string_prefixes.py.snap Formatter: Better f-string dummy (#5730) 2023-07-13 09:27:25 +00:00
black_compatibility@simple_cases__torture.py.snap Format assert statement (#5168) 2023-07-14 09:01:33 +02:00
black_compatibility@simple_cases__trailing_comma_optional_parens3.py.snap Prefer expanding parenthesized expressions before operands 2023-07-11 14:07:39 +02:00
black_compatibility@simple_cases__trailing_commas_in_leading_parts.py.snap Format assert statement (#5168) 2023-07-14 09:01:33 +02:00
black_compatibility@simple_cases__tupleassign.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
black_compatibility@simple_cases__whitespace.py.snap Update Black tests (#5438) 2023-06-30 06:32:50 +00:00
format@carriage_return__string.py.snap Normalize '\r' in string literals to '\n' 2023-06-30 10:13:23 +02:00
format@expression__annotated_assign.py.snap Format target: annotation = value? expressions (#5661) 2023-07-11 16:40:28 +02:00
format@expression__attribute.py.snap Format import statements (#5493) 2023-07-04 07:07:20 +00:00
format@expression__binary.py.snap Avoid line break before for in comprehension if outer expression expands (#5912) 2023-07-20 10:07:22 +00:00
format@expression__boolean_operation.py.snap Format call expressions (without call chaining) (#5341) 2023-06-27 09:29:40 +00:00
format@expression__call.py.snap Improve comprehension line break beheavior 2023-07-11 16:51:24 +02:00
format@expression__compare.py.snap Cover Black's is_aritmetic_like formatting (#5738) 2023-07-14 17:54:58 +02:00
format@expression__dict.py.snap Fix typos found by codespell (#5607) 2023-07-08 12:33:18 +02:00
format@expression__dict_comp.py.snap Avoid line break before for in comprehension if outer expression expands (#5912) 2023-07-20 10:07:22 +00:00
format@expression__generator_exp.py.snap Format expr generator exp (#5804) 2023-07-19 13:01:58 +02:00
format@expression__if.py.snap Fix find_only_token_in_range with expression parentheses (#5645) 2023-07-10 15:55:19 +02:00
format@expression__lambda.py.snap Format lambda expression (#5806) 2023-07-19 11:47:56 +00:00
format@expression__list.py.snap Don't add a magic trailing comma for a single entry (#5463) 2023-07-03 21:48:44 +02:00
format@expression__list_comp.py.snap Avoid line break before for in comprehension if outer expression expands (#5912) 2023-07-20 10:07:22 +00:00
format@expression__named_expr.py.snap Format named expressions (walrus operator) (#5642) 2023-07-10 12:32:15 +00:00
format@expression__set_comp.py.snap Avoid line break before for in comprehension if outer expression expands (#5912) 2023-07-20 10:07:22 +00:00
format@expression__slice.py.snap Improve slice formatting (#5922) 2023-07-20 15:05:18 +00:00
format@expression__starred.py.snap Format ExpressionStarred nodes (#5654) 2023-07-11 06:08:08 +00:00
format@expression__string.py.snap Cover Black's is_aritmetic_like formatting (#5738) 2023-07-14 17:54:58 +02:00
format@expression__tuple.py.snap Format raise statement (#5595) 2023-07-10 21:23:49 +02:00
format@expression__unary.py.snap Prefer expanding parenthesized expressions before operands 2023-07-11 14:07:39 +02:00
format@skip_magic_trailing_comma.py.snap Fix typos found by codespell (#5607) 2023-07-08 12:33:18 +02:00
format@statement__ann_assign.py.snap Fix StmtAnnAssign formatting by mirroring StmtAssign (#5732) 2023-07-13 10:51:25 +00:00
format@statement__assert.py.snap Format assert statement (#5168) 2023-07-14 09:01:33 +02:00
format@statement__assign.py.snap Properly group assignment targets (#5728) 2023-07-13 16:00:49 +02:00
format@statement__aug_assign.py.snap Fix StmtAnnAssign formatting by mirroring StmtAssign (#5732) 2023-07-13 10:51:25 +00:00
format@statement__break.py.snap Add tests for skip magic trailing comma 2023-06-26 14:15:55 +02:00
format@statement__class_definition.py.snap Fix invalid syntax for binary expression in unary op (#5370) 2023-06-29 08:09:26 +02:00
format@statement__delete.py.snap Format delete statement (#5169) 2023-07-11 08:36:26 +02:00
format@statement__for.py.snap Pass parent to NeedsParentheses (#5708) 2023-07-13 08:57:29 +02:00
format@statement__function.py.snap Refactor StmtIf: Formatter and Linter (#5459) 2023-07-18 13:40:15 +02:00
format@statement__if.py.snap Refactor StmtIf: Formatter and Linter (#5459) 2023-07-18 13:40:15 +02:00
format@statement__import.py.snap Format import statements (#5493) 2023-07-04 07:07:20 +00:00
format@statement__import_from.py.snap Format import statements (#5493) 2023-07-04 07:07:20 +00:00
format@statement__raise.py.snap Pass parent to NeedsParentheses (#5708) 2023-07-13 08:57:29 +02:00
format@statement__try.py.snap Fix formatter StmtTry test (#5568) 2023-07-06 18:23:53 +00:00
format@statement__type_alias.py.snap Type alias stub for formatter (#5880) 2023-07-19 17:28:07 +02:00
format@statement__while.py.snap Pass parent to NeedsParentheses (#5708) 2023-07-13 08:57:29 +02:00
format@statement__with.py.snap Format expr generator exp (#5804) 2023-07-19 13:01:58 +02:00
format@trivia.py.snap Add tests for skip magic trailing comma 2023-06-26 14:15:55 +02:00