ruff/crates/ruff_python_parser/tests/snapshots
Brent Westbrook dcf31c9348
[syntax-errors] PEP 701 f-strings before Python 3.12 (#16543)
## Summary

This PR detects the use of PEP 701 f-strings before 3.12. This one
sounded difficult and ended up being pretty easy, so I think there's a
good chance I've over-simplified things. However, from experimenting in
the Python REPL and checking with [pyright], I think this is correct.
pyright actually doesn't even flag the comment case, but Python does.

I also checked pyright's implementation for
[quotes](98dc4469cc/packages/pyright-internal/src/analyzer/checker.ts (L1379-L1398))
and
[escapes](98dc4469cc/packages/pyright-internal/src/analyzer/checker.ts (L1365-L1377))
and think I've approximated how they do it.

Python's error messages also point to the simple approach of these
characters simply not being allowed:

```pycon
Python 3.11.11 (main, Feb 12 2025, 14:51:05) [Clang 19.1.6 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f'''multiline {
... expression # comment
... }'''
  File "<stdin>", line 3
    }'''
        ^
SyntaxError: f-string expression part cannot include '#'
>>> f'''{not a line \
... continuation}'''
  File "<stdin>", line 2
    continuation}'''
                    ^
SyntaxError: f-string expression part cannot include a backslash
>>> f'hello {'world'}'
  File "<stdin>", line 1
    f'hello {'world'}'
              ^^^^^
SyntaxError: f-string: expecting '}'
```

And since escapes aren't allowed, I don't think there are any tricky
cases where nested quotes or comments can sneak in.

It's also slightly annoying that the error is repeated for every nested
quote character, but that also mirrors pyright, although they highlight
the whole nested string, which is a little nicer. However, their check
is in the analysis phase, so I don't think we have such easy access to
the quoted range, at least without adding another mini visitor.

## Test Plan

New inline tests

[pyright]:
https://pyright-play.net/?pythonVersion=3.11&strict=true&code=EYQw5gBAvBAmCWBjALgCgO4gHaygRgEoAoEaCAIgBpyiiBiCLAUwGdknYIBHAVwHt2LIgDMA5AFlwSCJhwAuCAG8IoMAG1Rs2KIC6EAL6iIxosbPmLlq5foRWiEAAcmERAAsQAJxAomnltY2wuSKogA6WKIAdABWfPBYqCAE%2BuSBVqbpWVm2iHwAtvlMWMgB2ekiolUAgq4FjgA2TAAeEMieSADWCsoV5qoaqrrGDJ5MiDz%2B8ABuLqosAIREhlXlaybrmyYMXsDw7V4AnoysyAmQ5SIhwYo3d9cheADUeKlv5O%2BpQA
2025-03-18 11:12:15 -04:00
..
invalid_syntax@ann_assign_stmt_invalid_annotation.py.snap
invalid_syntax@ann_assign_stmt_invalid_target.py.snap
invalid_syntax@ann_assign_stmt_invalid_value.py.snap
invalid_syntax@ann_assign_stmt_missing_rhs.py.snap
invalid_syntax@ann_assign_stmt_type_alias_annotation.py.snap
invalid_syntax@args_unparenthesized_generator.py.snap
invalid_syntax@assert_empty_msg.py.snap
invalid_syntax@assert_empty_test.py.snap
invalid_syntax@assert_invalid_msg_expr.py.snap
invalid_syntax@assert_invalid_test_expr.py.snap
invalid_syntax@assign_stmt_invalid_target.py.snap
invalid_syntax@assign_stmt_invalid_value_expr.py.snap
invalid_syntax@assign_stmt_keyword_target.py.snap
invalid_syntax@assign_stmt_missing_rhs.py.snap
invalid_syntax@async_unexpected_token.py.snap
invalid_syntax@aug_assign_stmt_invalid_target.py.snap
invalid_syntax@aug_assign_stmt_invalid_value.py.snap
invalid_syntax@aug_assign_stmt_missing_rhs.py.snap
invalid_syntax@case_expect_indented_block.py.snap
invalid_syntax@class_def_empty_body.py.snap
invalid_syntax@class_def_missing_name.py.snap
invalid_syntax@class_def_unclosed_type_param_list.py.snap
invalid_syntax@class_type_params_py311.py.snap [syntax-errors] Type parameter lists before Python 3.12 (#16479) 2025-03-05 13:19:09 +00:00
invalid_syntax@clause_expect_indented_block.py.snap
invalid_syntax@clause_expect_single_statement.py.snap
invalid_syntax@comma_separated_missing_comma.py.snap
invalid_syntax@comma_separated_missing_comma_between_elements.py.snap
invalid_syntax@comma_separated_missing_element_between_commas.py.snap
invalid_syntax@comma_separated_missing_first_element.py.snap
invalid_syntax@comprehension_missing_for_after_async.py.snap
invalid_syntax@decorator_await_expression_py38.py.snap [syntax-errors] Improve error message and range for pre-PEP-614 decorator syntax errors (#16581) 2025-03-17 11:17:27 +00:00
invalid_syntax@decorator_dict_literal_py38.py.snap [syntax-errors] Improve error message and range for pre-PEP-614 decorator syntax errors (#16581) 2025-03-17 11:17:27 +00:00
invalid_syntax@decorator_expression_py38.py.snap [syntax-errors] Improve error message and range for pre-PEP-614 decorator syntax errors (#16581) 2025-03-17 11:17:27 +00:00
invalid_syntax@decorator_float_literal_py38.py.snap [syntax-errors] Improve error message and range for pre-PEP-614 decorator syntax errors (#16581) 2025-03-17 11:17:27 +00:00
invalid_syntax@decorator_invalid_expression.py.snap
invalid_syntax@decorator_missing_expression.py.snap
invalid_syntax@decorator_missing_newline.py.snap
invalid_syntax@decorator_named_expression_py37.py.snap [syntax-errors] Improve error message and range for pre-PEP-614 decorator syntax errors (#16581) 2025-03-17 11:17:27 +00:00
invalid_syntax@decorator_non_toplevel_call_expression_py38.py.snap [syntax-errors] Improve error message and range for pre-PEP-614 decorator syntax errors (#16581) 2025-03-17 11:17:27 +00:00
invalid_syntax@decorator_unexpected_token.py.snap
invalid_syntax@del_incomplete_target.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@del_stmt_empty.py.snap
invalid_syntax@dotted_name_multiple_dots.py.snap
invalid_syntax@except_star_py310.py.snap [syntax-errors] Limit except* range to * (#16473) 2025-03-04 16:50:09 +00:00
invalid_syntax@except_stmt_invalid_expression.py.snap
invalid_syntax@except_stmt_missing_as_name.py.snap
invalid_syntax@except_stmt_missing_exception.py.snap
invalid_syntax@except_stmt_missing_exception_and_as_name.py.snap
invalid_syntax@except_stmt_unparenthesized_tuple.py.snap
invalid_syntax@expressions__arguments__double_starred.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__arguments__duplicate_keyword_arguments.py.snap
invalid_syntax@expressions__arguments__invalid_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__arguments__invalid_keyword_expression.py.snap
invalid_syntax@expressions__arguments__invalid_order.py.snap
invalid_syntax@expressions__arguments__missing_argument.py.snap
invalid_syntax@expressions__arguments__missing_comma.py.snap
invalid_syntax@expressions__arguments__missing_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__arguments__starred.py.snap
invalid_syntax@expressions__arguments__unclosed_0.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__arguments__unclosed_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__arguments__unclosed_2.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__attribute__invalid_member.py.snap
invalid_syntax@expressions__attribute__multiple_dots.py.snap
invalid_syntax@expressions__attribute__no_member.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__await__no_expression_0.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__await__no_expression_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__await__recover.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__bin_op__invalid_rhs_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__bin_op__missing_lhs.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__bin_op__missing_rhs_0.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__bin_op__missing_rhs_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__bin_op__multiple_ops.py.snap
invalid_syntax@expressions__bin_op__named_expression.py.snap
invalid_syntax@expressions__bin_op__starred_expression.py.snap
invalid_syntax@expressions__bool_op__invalid_rhs_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__bool_op__missing_lhs.py.snap
invalid_syntax@expressions__bool_op__missing_rhs.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__bool_op__named_expression.py.snap
invalid_syntax@expressions__bool_op__starred_expression.py.snap
invalid_syntax@expressions__compare__invalid_order.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__compare__invalid_rhs_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__compare__missing_lhs.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__compare__missing_rhs_0.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__compare__missing_rhs_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__compare__missing_rhs_2.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__compare__multiple_equals.py.snap
invalid_syntax@expressions__compare__named_expression.py.snap
invalid_syntax@expressions__compare__starred_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__comprehension.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__double_star.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__double_star_comprehension.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__missing_closing_brace_0.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__missing_closing_brace_1.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__missing_closing_brace_2.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__named_expression_0.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__named_expression_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__dict__recover.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__emoji_identifiers.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__emoji_statement.py.snap
invalid_syntax@expressions__if__missing_orelse_expr_0.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__if__missing_orelse_expr_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__if__missing_test_expr_0.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__if__missing_test_expr_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__if__recover.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__lambda_default_parameters.py.snap
invalid_syntax@expressions__lambda_duplicate_parameters.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__list__comprehension.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__list__missing_closing_bracket_0.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__list__missing_closing_bracket_1.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__list__missing_closing_bracket_2.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__list__missing_closing_bracket_3.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__list__recover.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__list__star_expression_precedence.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__named__invalid_target.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__named__missing_expression_0.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__named__missing_expression_1.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__named__missing_expression_2.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__named__missing_expression_3.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__named__missing_expression_4.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__parenthesized__generator.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__parenthesized__missing_closing_paren_0.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__parenthesized__missing_closing_paren_1.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__parenthesized__missing_closing_paren_2.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__parenthesized__missing_closing_paren_3.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__parenthesized__parenthesized.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__parenthesized__tuple.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__parenthesized__tuple_starred_expr.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__set__comprehension.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__set__missing_closing_curly_brace_0.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__set__missing_closing_curly_brace_1.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__set__missing_closing_curly_brace_2.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__set__missing_closing_curly_brace_3.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__set__recover.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__set__star_expression_precedence.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__subscript__invalid_slice_element.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__subscript__unclosed_slice_0.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__subscript__unclosed_slice_1.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__unary.py.snap
invalid_syntax@expressions__unary__named_expression.py.snap
invalid_syntax@expressions__unary__no_expression_0.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__unary__no_expression_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__yield__named_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__yield__star_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__yield_from__starred_expression.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@expressions__yield_from__unparenthesized.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@f_string_empty_expression.py.snap
invalid_syntax@f_string_invalid_conversion_flag_name_tok.py.snap
invalid_syntax@f_string_invalid_conversion_flag_other_tok.py.snap
invalid_syntax@f_string_invalid_starred_expr.py.snap
invalid_syntax@f_string_lambda_without_parentheses.py.snap
invalid_syntax@f_string_unclosed_lbrace.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@f_string_unclosed_lbrace_in_format_spec.py.snap
invalid_syntax@for_iter_unpack_py38.py.snap [syntax-errors] Tuple unpacking in for statement iterator clause before Python 3.9 (#16558) 2025-03-13 15:55:17 -04:00
invalid_syntax@for_stmt_invalid_iter_expr.py.snap
invalid_syntax@for_stmt_invalid_target.py.snap
invalid_syntax@for_stmt_invalid_target_binary_expr.py.snap
invalid_syntax@for_stmt_invalid_target_in_keyword.py.snap
invalid_syntax@for_stmt_missing_in_keyword.py.snap
invalid_syntax@for_stmt_missing_iter.py.snap
invalid_syntax@for_stmt_missing_target.py.snap
invalid_syntax@from_import_dotted_names.py.snap
invalid_syntax@from_import_empty_names.py.snap
invalid_syntax@from_import_missing_module.py.snap
invalid_syntax@from_import_missing_rpar.py.snap
invalid_syntax@from_import_star_with_other_names.py.snap
invalid_syntax@from_import_unparenthesized_trailing_comma.py.snap
invalid_syntax@function_def_empty_body.py.snap
invalid_syntax@function_def_invalid_return_expr.py.snap
invalid_syntax@function_def_missing_identifier.py.snap
invalid_syntax@function_def_missing_return_type.py.snap
invalid_syntax@function_def_unclosed_parameter_list.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@function_def_unclosed_type_param_list.py.snap
invalid_syntax@function_def_unparenthesized_return_types.py.snap
invalid_syntax@function_type_params_py311.py.snap [syntax-errors] Type parameter lists before Python 3.12 (#16479) 2025-03-05 13:19:09 +00:00
invalid_syntax@global_stmt_empty.py.snap
invalid_syntax@global_stmt_expression.py.snap
invalid_syntax@global_stmt_trailing_comma.py.snap
invalid_syntax@if_stmt_elif_missing_colon.py.snap
invalid_syntax@if_stmt_empty_body.py.snap
invalid_syntax@if_stmt_invalid_elif_test_expr.py.snap
invalid_syntax@if_stmt_invalid_test_expr.py.snap
invalid_syntax@if_stmt_missing_colon.py.snap
invalid_syntax@if_stmt_missing_test.py.snap
invalid_syntax@if_stmt_misspelled_elif.py.snap test: update snapshots with improper end-of-line placement 2025-01-15 13:37:52 -05:00
invalid_syntax@implicitly_concatenated_unterminated_string.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@implicitly_concatenated_unterminated_string_multiline.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@import_alias_missing_asname.py.snap
invalid_syntax@import_stmt_empty.py.snap
invalid_syntax@import_stmt_parenthesized_names.py.snap
invalid_syntax@import_stmt_star_import.py.snap
invalid_syntax@import_stmt_trailing_comma.py.snap
invalid_syntax@invalid_byte_literal.py.snap
invalid_syntax@invalid_del_target.py.snap
invalid_syntax@invalid_fstring_literal_element.py.snap
invalid_syntax@invalid_string_literal.py.snap
invalid_syntax@iter_unpack_return_py37.py.snap [syntax-errors] Tuple unpacking in return and yield before Python 3.8 (#16485) 2025-03-06 11:57:20 -05:00
invalid_syntax@iter_unpack_yield_py37.py.snap [syntax-errors] Tuple unpacking in return and yield before Python 3.8 (#16485) 2025-03-06 11:57:20 -05:00
invalid_syntax@lambda_body_with_starred_expr.py.snap
invalid_syntax@lambda_body_with_yield_expr.py.snap
invalid_syntax@match_before_py310.py.snap Allow passing ParseOptions to inline tests (#16357) 2025-02-27 10:23:15 -05:00
invalid_syntax@match_classify_as_keyword.py.snap
invalid_syntax@match_classify_as_keyword_or_identifier.py.snap
invalid_syntax@match_expected_colon.py.snap
invalid_syntax@match_stmt_expect_indented_block.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@match_stmt_expected_case_block.py.snap test: update snapshots with improper end-of-line placement 2025-01-15 13:37:52 -05:00
invalid_syntax@match_stmt_invalid_guard_expr.py.snap
invalid_syntax@match_stmt_invalid_subject_expr.py.snap
invalid_syntax@match_stmt_missing_guard_expr.py.snap
invalid_syntax@match_stmt_missing_pattern.py.snap
invalid_syntax@match_stmt_no_newline_before_case.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@match_stmt_single_starred_subject.py.snap
invalid_syntax@mixed_bytes_and_non_bytes_literals.py.snap
invalid_syntax@multiple_clauses_on_same_line.py.snap
invalid_syntax@named_expr_slice.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
invalid_syntax@named_expr_slice_parse_error.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
invalid_syntax@node_range_with_gaps.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@nonlocal_stmt_empty.py.snap
invalid_syntax@nonlocal_stmt_expression.py.snap
invalid_syntax@nonlocal_stmt_trailing_comma.py.snap
invalid_syntax@param_missing_annotation.py.snap
invalid_syntax@param_missing_default.py.snap
invalid_syntax@param_with_invalid_annotation.py.snap
invalid_syntax@param_with_invalid_default.py.snap
invalid_syntax@param_with_invalid_star_annotation.py.snap
invalid_syntax@param_with_star_annotation_py310.py.snap [syntax-errors] Star annotations before Python 3.11 (#16545) 2025-03-14 15:20:44 +00:00
invalid_syntax@params_duplicate_names.py.snap
invalid_syntax@params_expected_after_star_separator.py.snap
invalid_syntax@params_kwarg_after_star_separator.py.snap
invalid_syntax@params_multiple_kwargs.py.snap
invalid_syntax@params_multiple_slash_separator.py.snap
invalid_syntax@params_multiple_star_separator.py.snap
invalid_syntax@params_multiple_varargs.py.snap
invalid_syntax@params_no_arg_before_slash.py.snap
invalid_syntax@params_non_default_after_default.py.snap
invalid_syntax@params_star_after_slash.py.snap
invalid_syntax@params_star_separator_after_star_param.py.snap
invalid_syntax@params_var_keyword_with_default.py.snap
invalid_syntax@params_var_positional_with_default.py.snap
invalid_syntax@parenthesized_context_manager_py38.py.snap [syntax-errors] Parenthesized context managers before Python 3.9 (#16523) 2025-03-17 08:54:55 -04:00
invalid_syntax@parenthesized_kwarg_py38.py.snap [syntax-errors] Parenthesized keyword argument names after Python 3.8 (#16482) 2025-03-06 12:18:13 -05:00
invalid_syntax@pep701_f_string_py311.py.snap [syntax-errors] PEP 701 f-strings before Python 3.12 (#16543) 2025-03-18 11:12:15 -04:00
invalid_syntax@pos_only_py37.py.snap [syntax-errors] Positional-only parameters before Python 3.8 (#16481) 2025-03-05 13:46:43 +00:00
invalid_syntax@raise_stmt_from_without_exc.py.snap
invalid_syntax@raise_stmt_invalid_cause.py.snap
invalid_syntax@raise_stmt_invalid_exc.py.snap
invalid_syntax@raise_stmt_unparenthesized_tuple_cause.py.snap
invalid_syntax@raise_stmt_unparenthesized_tuple_exc.py.snap
invalid_syntax@re_lex_logical_token.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@re_lex_logical_token_mac_eol.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@re_lex_logical_token_windows_eol.py.snap test: update snapshots with improper end-of-line placement 2025-01-15 13:37:52 -05:00
invalid_syntax@re_lexing__fstring_format_spec_1.py.snap test: add more missing carets 2025-01-15 13:37:52 -05:00
invalid_syntax@re_lexing__line_continuation_1.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@re_lexing__line_continuation_windows_eol.py.snap test: update snapshots with improper end-of-line placement 2025-01-15 13:37:52 -05:00
invalid_syntax@re_lexing__triple_quoted_fstring_1.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@re_lexing__triple_quoted_fstring_2.py.snap
invalid_syntax@re_lexing__triple_quoted_fstring_3.py.snap
invalid_syntax@return_stmt_invalid_expr.py.snap
invalid_syntax@simple_and_compound_stmt_on_same_line.py.snap
invalid_syntax@simple_and_compound_stmt_on_same_line_in_block.py.snap
invalid_syntax@simple_stmts_on_same_line.py.snap
invalid_syntax@simple_stmts_on_same_line_in_block.py.snap
invalid_syntax@star_index_py310.py.snap [syntax-errors] Star expression in index before Python 3.11 (#16544) 2025-03-14 14:51:34 +00:00
invalid_syntax@star_slices.py.snap [syntax-errors] Star expression in index before Python 3.11 (#16544) 2025-03-14 14:51:34 +00:00
invalid_syntax@statements__function_type_parameters.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__if_extra_closing_parentheses.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__if_extra_indent.py.snap test: add more missing carets 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__invalid_assignment_targets.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__invalid_augmented_assignment_target.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__match__as_pattern_0.py.snap
invalid_syntax@statements__match__as_pattern_1.py.snap
invalid_syntax@statements__match__as_pattern_2.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__match__as_pattern_3.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__match__as_pattern_4.py.snap
invalid_syntax@statements__match__invalid_class_pattern.py.snap
invalid_syntax@statements__match__invalid_lhs_or_rhs_pattern.py.snap
invalid_syntax@statements__match__invalid_mapping_pattern.py.snap
invalid_syntax@statements__match__star_pattern_usage.py.snap
invalid_syntax@statements__match__unary_add_usage.py.snap
invalid_syntax@statements__with__ambiguous_lpar_with_items.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__with__empty_with_items.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__with__unclosed_ambiguous_lpar.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__with__unclosed_ambiguous_lpar_eof.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@statements__with__unparenthesized_with_items.py.snap test: update snapshots with just whitespace changes 2025-01-15 13:37:52 -05:00
invalid_syntax@try_stmt_invalid_order.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@try_stmt_missing_except_finally.py.snap test: update snapshots with missing annotations 2025-01-15 13:37:52 -05:00
invalid_syntax@try_stmt_misspelled_except.py.snap test: add more missing carets 2025-01-15 13:37:52 -05:00
invalid_syntax@try_stmt_mixed_except_kind.py.snap
invalid_syntax@tuple_context_manager_py38.py.snap [syntax-errors] Parenthesized context managers before Python 3.9 (#16523) 2025-03-17 08:54:55 -04:00
invalid_syntax@type_alias_incomplete_stmt.py.snap
invalid_syntax@type_alias_invalid_value_expr.py.snap
invalid_syntax@type_param_default_py312.py.snap [syntax-errors] Type parameter defaults before Python 3.13 (#16447) 2025-03-04 16:53:38 +00:00
invalid_syntax@type_param_invalid_bound_expr.py.snap
invalid_syntax@type_param_missing_bound.py.snap
invalid_syntax@type_param_param_spec_bound.py.snap
invalid_syntax@type_param_param_spec_invalid_default_expr.py.snap
invalid_syntax@type_param_param_spec_missing_default.py.snap
invalid_syntax@type_param_type_var_invalid_default_expr.py.snap
invalid_syntax@type_param_type_var_missing_default.py.snap
invalid_syntax@type_param_type_var_tuple_bound.py.snap
invalid_syntax@type_param_type_var_tuple_invalid_default_expr.py.snap
invalid_syntax@type_param_type_var_tuple_missing_default.py.snap
invalid_syntax@type_params_empty.py.snap
invalid_syntax@type_stmt_py311.py.snap [syntax-errors] type alias statements before Python 3.12 (#16478) 2025-03-04 17:20:10 +00:00
invalid_syntax@unparenthesized_named_expr_index_py38.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
invalid_syntax@unparenthesized_named_expr_set_comp_py38.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
invalid_syntax@unparenthesized_named_expr_set_literal_py38.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
invalid_syntax@unterminated_fstring_newline_recovery.py.snap test: update snapshots with missing ^ 2025-01-15 13:37:52 -05:00
invalid_syntax@walrus_py37.py.snap [syntax-errors] Assignment expressions before Python 3.8 (#16383) 2025-02-28 17:13:46 -05:00
invalid_syntax@while_stmt_invalid_test_expr.py.snap
invalid_syntax@while_stmt_missing_colon.py.snap
invalid_syntax@while_stmt_missing_test.py.snap
invalid_syntax@with_items_parenthesized_missing_colon.py.snap
invalid_syntax@with_items_parenthesized_missing_comma.py.snap
valid_syntax@ambiguous_lpar_with_items_binary_expr.py.snap
valid_syntax@ambiguous_lpar_with_items_if_expr.py.snap
valid_syntax@ann_assign_stmt_simple_target.py.snap
valid_syntax@args_unparenthesized_generator.py.snap
valid_syntax@assign_targets_terminator.py.snap
valid_syntax@async_for_statement.py.snap
valid_syntax@async_function_definition.py.snap
valid_syntax@async_with_statement.py.snap
valid_syntax@class_def_arguments.py.snap
valid_syntax@class_type_params_py312.py.snap [syntax-errors] Type parameter lists before Python 3.12 (#16479) 2025-03-05 13:19:09 +00:00
valid_syntax@comma_separated_regular_list_terminator.py.snap
valid_syntax@decorator_async_function.py.snap
valid_syntax@decorator_await_expression_py39.py.snap [syntax-errors] Improve error message and range for pre-PEP-614 decorator syntax errors (#16581) 2025-03-17 11:17:27 +00:00
valid_syntax@decorator_expression_dotted_ident_py38.py.snap [syntax-errors] Named expressions in decorators before Python 3.9 (#16386) 2025-03-05 17:08:18 +00:00
valid_syntax@decorator_expression_eval_hack_py38.py.snap [syntax-errors] Named expressions in decorators before Python 3.9 (#16386) 2025-03-05 17:08:18 +00:00
valid_syntax@decorator_expression_identity_hack_py38.py.snap [syntax-errors] Named expressions in decorators before Python 3.9 (#16386) 2025-03-05 17:08:18 +00:00
valid_syntax@decorator_expression_py39.py.snap [syntax-errors] Named expressions in decorators before Python 3.9 (#16386) 2025-03-05 17:08:18 +00:00
valid_syntax@del_targets_terminator.py.snap
valid_syntax@dotted_name_normalized_spaces.py.snap
valid_syntax@except_star_py311.py.snap [syntax-errors] except* before Python 3.11 (#16446) 2025-03-02 18:20:18 +00:00
valid_syntax@except_stmt_as_name_soft_keyword.py.snap
valid_syntax@expressions__arguments.py.snap
valid_syntax@expressions__attribute.py.snap
valid_syntax@expressions__await.py.snap
valid_syntax@expressions__bin_op.py.snap
valid_syntax@expressions__bool_op.py.snap
valid_syntax@expressions__call.py.snap
valid_syntax@expressions__compare.py.snap
valid_syntax@expressions__dictionary.py.snap
valid_syntax@expressions__dictionary_comprehension.py.snap
valid_syntax@expressions__f_string.py.snap
valid_syntax@expressions__generator.py.snap
valid_syntax@expressions__if.py.snap
valid_syntax@expressions__lambda.py.snap
valid_syntax@expressions__list.py.snap
valid_syntax@expressions__list_comprehension.py.snap
valid_syntax@expressions__name.py.snap
valid_syntax@expressions__named.py.snap
valid_syntax@expressions__number_literal.py.snap
valid_syntax@expressions__parenthesized.py.snap
valid_syntax@expressions__set.py.snap
valid_syntax@expressions__set_comprehension.py.snap
valid_syntax@expressions__slice.py.snap
valid_syntax@expressions__starred.py.snap
valid_syntax@expressions__string.py.snap
valid_syntax@expressions__subscript.py.snap
valid_syntax@expressions__tuple.py.snap
valid_syntax@expressions__unary_op.py.snap
valid_syntax@expressions__yield.py.snap
valid_syntax@expressions__yield_from.py.snap
valid_syntax@for_in_target_valid_expr.py.snap
valid_syntax@for_iter_unpack_py38.py.snap [syntax-errors] Tuple unpacking in for statement iterator clause before Python 3.9 (#16558) 2025-03-13 15:55:17 -04:00
valid_syntax@for_iter_unpack_py39.py.snap [syntax-errors] Tuple unpacking in for statement iterator clause before Python 3.9 (#16558) 2025-03-13 15:55:17 -04:00
valid_syntax@from_import_no_space.py.snap
valid_syntax@from_import_soft_keyword_module_name.py.snap
valid_syntax@from_import_stmt_terminator.py.snap
valid_syntax@fstring_format_spec_terminator.py.snap
valid_syntax@function_def_parameter_range.py.snap
valid_syntax@function_def_parenthesized_return_types.py.snap
valid_syntax@function_def_valid_return_expr.py.snap
valid_syntax@function_type_params_py312.py.snap [syntax-errors] Type parameter lists before Python 3.12 (#16479) 2025-03-05 13:19:09 +00:00
valid_syntax@global_stmt.py.snap
valid_syntax@import_as_name_soft_keyword.py.snap
valid_syntax@import_stmt_terminator.py.snap
valid_syntax@iter_unpack_return_py37.py.snap [syntax-errors] Tuple unpacking in return and yield before Python 3.8 (#16485) 2025-03-06 11:57:20 -05:00
valid_syntax@iter_unpack_return_py38.py.snap [syntax-errors] Tuple unpacking in return and yield before Python 3.8 (#16485) 2025-03-06 11:57:20 -05:00
valid_syntax@iter_unpack_yield_py37.py.snap [syntax-errors] Tuple unpacking in return and yield before Python 3.8 (#16485) 2025-03-06 11:57:20 -05:00
valid_syntax@iter_unpack_yield_py38.py.snap [syntax-errors] Tuple unpacking in return and yield before Python 3.8 (#16485) 2025-03-06 11:57:20 -05:00
valid_syntax@lambda_with_no_parameters.py.snap
valid_syntax@lambda_with_valid_body.py.snap
valid_syntax@match_after_py310.py.snap Allow passing ParseOptions to inline tests (#16357) 2025-02-27 10:23:15 -05:00
valid_syntax@match_as_pattern.py.snap
valid_syntax@match_as_pattern_soft_keyword.py.snap
valid_syntax@match_attr_pattern_soft_keyword.py.snap
valid_syntax@match_classify_as_identifier_1.py.snap
valid_syntax@match_classify_as_identifier_2.py.snap
valid_syntax@match_classify_as_keyword_1.py.snap
valid_syntax@match_classify_as_keyword_2.py.snap
valid_syntax@match_classify_as_keyword_or_identifier.py.snap
valid_syntax@match_sequence_pattern_parentheses_terminator.py.snap
valid_syntax@match_sequence_pattern_terminator.py.snap
valid_syntax@match_stmt_subject_expr.py.snap
valid_syntax@match_stmt_valid_guard_expr.py.snap
valid_syntax@nonlocal_stmt.py.snap
valid_syntax@other__atom.py.snap
valid_syntax@other__decorator.py.snap
valid_syntax@param_with_annotation.py.snap
valid_syntax@param_with_default.py.snap
valid_syntax@param_with_star_annotation.py.snap
valid_syntax@param_with_star_annotation_py311.py.snap [syntax-errors] Star annotations before Python 3.11 (#16545) 2025-03-14 15:20:44 +00:00
valid_syntax@params_non_default_after_star.py.snap
valid_syntax@params_seen_keyword_only_param_after_star.py.snap
valid_syntax@parenthesized_context_manager_py39.py.snap [syntax-errors] Parenthesized context managers before Python 3.9 (#16523) 2025-03-17 08:54:55 -04:00
valid_syntax@parenthesized_kwarg_py37.py.snap [syntax-errors] Parenthesized keyword argument names after Python 3.8 (#16482) 2025-03-06 12:18:13 -05:00
valid_syntax@parenthesized_named_expr_index_py38.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
valid_syntax@parenthesized_named_expr_py38.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
valid_syntax@pep701_f_string_py311.py.snap [syntax-errors] PEP 701 f-strings before Python 3.12 (#16543) 2025-03-18 11:12:15 -04:00
valid_syntax@pep701_f_string_py312.py.snap [syntax-errors] PEP 701 f-strings before Python 3.12 (#16543) 2025-03-18 11:12:15 -04:00
valid_syntax@pos_only_py38.py.snap [syntax-errors] Positional-only parameters before Python 3.8 (#16481) 2025-03-05 13:46:43 +00:00
valid_syntax@simple_stmts_in_block.py.snap
valid_syntax@simple_stmts_with_semicolons.py.snap
valid_syntax@star_index_py311.py.snap [syntax-errors] Star expression in index before Python 3.11 (#16544) 2025-03-14 14:51:34 +00:00
valid_syntax@statement__ambiguous_lpar_with_items.py.snap
valid_syntax@statement__annotated_assignment.py.snap
valid_syntax@statement__assert.py.snap
valid_syntax@statement__assignment.py.snap
valid_syntax@statement__augmented_assignment.py.snap
valid_syntax@statement__class.py.snap
valid_syntax@statement__delete.py.snap
valid_syntax@statement__for.py.snap
valid_syntax@statement__from_import.py.snap
valid_syntax@statement__function.py.snap
valid_syntax@statement__if.py.snap
valid_syntax@statement__import.py.snap
valid_syntax@statement__match.py.snap
valid_syntax@statement__raise.py.snap
valid_syntax@statement__return.py.snap
valid_syntax@statement__simple.py.snap
valid_syntax@statement__try.py.snap
valid_syntax@statement__type.py.snap
valid_syntax@statement__while.py.snap
valid_syntax@statement__with.py.snap
valid_syntax@tuple_context_manager_py38.py.snap [syntax-errors] Parenthesized context managers before Python 3.9 (#16523) 2025-03-17 08:54:55 -04:00
valid_syntax@type_param_default_py313.py.snap [syntax-errors] Type parameter defaults before Python 3.13 (#16447) 2025-03-04 16:53:38 +00:00
valid_syntax@type_param_param_spec.py.snap
valid_syntax@type_param_type_var.py.snap
valid_syntax@type_param_type_var_tuple.py.snap
valid_syntax@type_stmt_py312.py.snap [syntax-errors] type alias statements before Python 3.12 (#16478) 2025-03-04 17:20:10 +00:00
valid_syntax@unparenthesized_named_expr_index_py39.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
valid_syntax@unparenthesized_named_expr_py39.py.snap [syntax-errors] Unparenthesized assignment expressions in sets and indexes (#16404) 2025-03-14 15:06:42 -04:00
valid_syntax@walrus_py38.py.snap [syntax-errors] Assignment expressions before Python 3.8 (#16383) 2025-02-28 17:13:46 -05:00