ruff/crates/ruff_python_parser/resources/inline/ok
Dhruv Manilawala 8020d486f6
Reset FOR_TARGET context for all kinds of parentheses (#11009)
## Summary

This PR fixes a bug in the new parser which involves the parser context
w.r.t. for statement. This is specifically around the `in` keyword which
can be present in the target expression and shouldn't be considered to
be part of the `for` statement header. Ideally it should use a context
which is passed between functions, thus using a call stack to set /
unset a specific variant which will be done in a follow-up PR as it
requires some amount of refactor.

## Test Plan

Add test cases and update the snapshots.
2024-04-18 19:37:50 +05:30
..
ann_assign_stmt_simple_target.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +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
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
for_in_target_postfix_expr.py Reset FOR_TARGET context for all kinds of parentheses (#11009) 2024-04-18 19:37:50 +05:30
from_import_no_space.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +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_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_as_pattern.py Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +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
parenthesized_compare_expr_in_for.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