From 5a23d6cd608f233753a47765ecc033816676dd0a Mon Sep 17 00:00:00 2001 From: David Szotten Date: Sun, 6 Aug 2023 17:34:32 +0100 Subject: [PATCH] snapshots --- ...uff_python_parser__parser__tests__try.snap | 4 +-- ...ython_parser__parser__tests__try_star.snap | 8 ++--- ...string__tests__fstring_constant_range.snap | 4 +-- ...ing__tests__fstring_escaped_character.snap | 2 +- ...tring__tests__fstring_escaped_newline.snap | 2 +- ...ing__tests__fstring_line_continuation.snap | 2 +- ...__fstring_parse_self_documenting_base.snap | 2 +- ...ring_parse_self_documenting_base_more.snap | 4 +-- ...fstring_parse_self_documenting_format.snap | 17 +++------ ...ing__tests__fstring_unescaped_newline.snap | 2 +- ...tring__tests__parse_f_string_concat_3.snap | 2 +- ..._parser__string__tests__parse_fstring.snap | 4 +-- ...__string__tests__parse_fstring_equals.snap | 2 +- ...ing__tests__parse_fstring_nested_spec.snap | 35 ++++++++----------- ...ring__tests__parse_fstring_not_equals.snap | 2 +- ..._tests__parse_fstring_not_nested_spec.snap | 17 +++------ ...ts__parse_fstring_self_doc_prec_space.snap | 2 +- ...parse_fstring_self_doc_trailing_space.snap | 2 +- ...ring__tests__parse_fstring_yield_expr.snap | 2 +- ...on_parser__string__tests__raw_fstring.snap | 2 +- ...ing__tests__triple_quoted_raw_fstring.snap | 2 +- 21 files changed, 49 insertions(+), 70 deletions(-) diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__try.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__try.snap index e5cc7e2f0b061c..a9a4d80527067a 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__try.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__try.snap @@ -119,7 +119,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], @@ -210,7 +210,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__try_star.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__try_star.snap index a14d8f4822e625..57e54f13278504 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__try_star.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__try_star.snap @@ -235,7 +235,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), String( @@ -266,7 +266,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], @@ -357,7 +357,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), String( @@ -388,7 +388,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_constant_range.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_constant_range.snap index e8334ed24dc352..9ce2f404c5b348 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_constant_range.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_constant_range.snap @@ -28,7 +28,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), String( @@ -49,7 +49,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), String( diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_escaped_character.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_escaped_character.snap index c100c833a4db37..44c46768b95ab7 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_escaped_character.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_escaped_character.snap @@ -28,7 +28,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_escaped_newline.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_escaped_newline.snap index e89a0495266dc0..a5d6d7c49cff48 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_escaped_newline.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_escaped_newline.snap @@ -28,7 +28,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_line_continuation.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_line_continuation.snap index fb1196306e8809..4f275e0035a558 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_line_continuation.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_line_continuation.snap @@ -28,7 +28,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_base.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_base.snap index 30c54ca5ea01c5..57eb29b3096a2d 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_base.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_base.snap @@ -23,7 +23,7 @@ JoinedStr( }, ), conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_base_more.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_base_more.snap index b6ba07d487a26a..c4069ef3ee5b84 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_base_more.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_base_more.snap @@ -29,7 +29,7 @@ JoinedStr( }, ), conversion: None, - format_spec: None, + format_spec: [], }, ), String( @@ -55,7 +55,7 @@ JoinedStr( }, ), conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_format.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_format.snap index 6d0f1866af9b09..e141260d3998a3 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_format.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_parse_self_documenting_format.snap @@ -23,21 +23,14 @@ JoinedStr( }, ), conversion: None, - format_spec: Some( - JoinedStr( - ExprJoinedStr { + format_spec: [ + String( + StringTodoName { range: 9..12, - values: [ - String( - StringTodoName { - range: 9..12, - value: ">10", - }, - ), - ], + value: ">10", }, ), - ), + ], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_unescaped_newline.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_unescaped_newline.snap index 0be5b813f5ab12..daae78c55242cc 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_unescaped_newline.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__fstring_unescaped_newline.snap @@ -28,7 +28,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_f_string_concat_3.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_f_string_concat_3.snap index c2dedeee1db9ba..4895379236187e 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_f_string_concat_3.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_f_string_concat_3.snap @@ -30,7 +30,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring.snap index 983fcdf076e62b..7ba7053af36a78 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring.snap @@ -18,7 +18,7 @@ JoinedStr( ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), FormattedValue( @@ -33,7 +33,7 @@ JoinedStr( ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), String( diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_equals.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_equals.snap index 0504823fe27ba6..359f51e2c46534 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_equals.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_equals.snap @@ -39,7 +39,7 @@ JoinedStr( ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_nested_spec.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_nested_spec.snap index abc58ad794f7c8..c34486c724266f 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_nested_spec.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_nested_spec.snap @@ -18,30 +18,23 @@ JoinedStr( ), debug_text: None, conversion: None, - format_spec: Some( - JoinedStr( - ExprJoinedStr { + format_spec: [ + FormattedValue( + FormattedValue { range: 7..13, - values: [ - FormattedValue( - FormattedValue { - range: 7..13, - expression: Name( - ExprName { - range: 8..12, - id: "spec", - ctx: Load, - }, - ), - debug_text: None, - conversion: None, - format_spec: None, - }, - ), - ], + expression: Name( + ExprName { + range: 8..12, + id: "spec", + ctx: Load, + }, + ), + debug_text: None, + conversion: None, + format_spec: [], }, ), - ), + ], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_not_equals.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_not_equals.snap index eec7ff603a1265..421ac4d142a78c 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_not_equals.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_not_equals.snap @@ -39,7 +39,7 @@ JoinedStr( ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_not_nested_spec.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_not_nested_spec.snap index 9d477037ac4726..526936f5ae46d9 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_not_nested_spec.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_not_nested_spec.snap @@ -18,21 +18,14 @@ JoinedStr( ), debug_text: None, conversion: None, - format_spec: Some( - JoinedStr( - ExprJoinedStr { + format_spec: [ + String( + StringTodoName { range: 7..11, - values: [ - String( - StringTodoName { - range: 7..11, - value: "spec", - }, - ), - ], + value: "spec", }, ), - ), + ], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_self_doc_prec_space.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_self_doc_prec_space.snap index 1b7b846c0f39ec..98390306c4422a 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_self_doc_prec_space.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_self_doc_prec_space.snap @@ -23,7 +23,7 @@ JoinedStr( }, ), conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_self_doc_trailing_space.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_self_doc_trailing_space.snap index 7e6ec533f0d1a2..9facfb298d2044 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_self_doc_trailing_space.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_self_doc_trailing_space.snap @@ -23,7 +23,7 @@ JoinedStr( }, ), conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_yield_expr.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_yield_expr.snap index 8419d4c9d6b723..b8ec6b0edcdf94 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_yield_expr.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__parse_fstring_yield_expr.snap @@ -17,7 +17,7 @@ JoinedStr( ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__raw_fstring.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__raw_fstring.snap index 67cb454edc67c2..49c3ffdd419848 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__raw_fstring.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__raw_fstring.snap @@ -22,7 +22,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__triple_quoted_raw_fstring.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__triple_quoted_raw_fstring.snap index 48c5f7be088d48..7a7bfd11db3e38 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__triple_quoted_raw_fstring.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__string__tests__triple_quoted_raw_fstring.snap @@ -22,7 +22,7 @@ expression: parse_ast ), debug_text: None, conversion: None, - format_spec: None, + format_spec: [], }, ), ],