ruff/crates/ruff_python_parser/resources/inline/ok
Brent Westbrook 4431978262
[syntax-errors] Assignment expressions before Python 3.8 (#16383)
## Summary
This PR is the first in a series derived from
https://github.com/astral-sh/ruff/pull/16308, each of which add support
for detecting one version-related syntax error from
https://github.com/astral-sh/ruff/issues/6591. This one should be
the largest because it also includes the addition of the 
`Parser::add_unsupported_syntax_error` method

Otherwise I think the general structure will be the same for each syntax
error:
* Detecting the error in the parser
* Inline parser tests for the new error
* New ruff CLI tests for the new error

## Test Plan
As noted above, there are new inline parser tests, as well as new ruff
CLI
tests. Once https://github.com/astral-sh/ruff/pull/16379 is resolved,
there should also be new mdtests for red-knot,
but this PR does not currently include those.
2025-02-28 17:13:46 -05:00
..
ambiguous_lpar_with_items_binary_expr.py Consider binary expr for parenthesized with items parsing (#11012) 2024-04-18 21:39:30 +05:30
ambiguous_lpar_with_items_if_expr.py Consider if expression for parenthesized with items parsing (#11010) 2024-04-18 14:30:15 +00:00
ann_assign_stmt_simple_target.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
args_unparenthesized_generator.py Raise syntax error for unparenthesized generator expr in multi-argument call (#12445) 2024-07-22 14:44:20 +05:30
assign_targets_terminator.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
async_for_statement.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
async_function_definition.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
async_with_statement.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
class_def_arguments.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
comma_separated_regular_list_terminator.py Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
decorator_async_function.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
del_targets_terminator.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
dotted_name_normalized_spaces.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
except_stmt_as_name_soft_keyword.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
for_in_target_valid_expr.py Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
from_import_no_space.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
from_import_soft_keyword_module_name.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
from_import_stmt_terminator.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
fstring_format_spec_terminator.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
function_def_parameter_range.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
function_def_parenthesized_return_types.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
function_def_valid_return_expr.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
global_stmt.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
import_as_name_soft_keyword.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
import_stmt_terminator.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
lambda_with_no_parameters.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
lambda_with_valid_body.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
match_after_py310.py Allow passing ParseOptions to inline tests (#16357) 2025-02-27 10:23:15 -05:00
match_as_pattern.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
match_as_pattern_soft_keyword.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
match_attr_pattern_soft_keyword.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
match_classify_as_identifier_1.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
match_classify_as_identifier_2.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
match_classify_as_keyword_1.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
match_classify_as_keyword_2.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
match_classify_as_keyword_or_identifier.py Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
match_sequence_pattern_parentheses_terminator.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
match_sequence_pattern_terminator.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
match_stmt_subject_expr.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
match_stmt_valid_guard_expr.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
nonlocal_stmt.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
param_with_annotation.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
param_with_default.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
param_with_star_annotation.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
params_non_default_after_star.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
params_seen_keyword_only_param_after_star.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
simple_stmts_in_block.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
simple_stmts_with_semicolons.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
type_param_param_spec.py Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
type_param_type_var.py Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
type_param_type_var_tuple.py Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
walrus_py38.py [syntax-errors] Assignment expressions before Python 3.8 (#16383) 2025-02-28 17:13:46 -05:00