Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Fix TypeAliasName to store name instead of load #42

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ruff_python_parser/src/python.lalrpop
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ FuncDef: ast::Stmt = {

TypeAliasName: ast::Expr = {
<location:@L> <name:Identifier> <end_location:@R> => ast::Expr::Name(
ast::ExprName { id: name.into(), ctx: ast::ExprContext::Load, range: (location..end_location).into() },
ast::ExprName { id: name.into(), ctx: ast::ExprContext::Store, range: (location..end_location).into() },
),
}

Expand Down
4 changes: 2 additions & 2 deletions ruff_python_parser/src/python.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// auto-generated: "lalrpop 0.20.0"
// sha3: bfe8038efa3e290b9841ea2f84a2278ded65476a00892aa448e9708655ccb86d
// sha3: 9c49dc85355275f274dcc32e163c443c0dc567214c9725547e2218e9acd22577
use num_bigint::BigInt;
use ruff_text_size::TextSize;
use ruff_python_ast::{self as ast, Ranged, MagicKind};
Expand Down Expand Up @@ -33544,7 +33544,7 @@ fn __action163<
) -> ast::Expr
{
ast::Expr::Name(
ast::ExprName { id: name.into(), ctx: ast::ExprContext::Load, range: (location..end_location).into() },
ast::ExprName { id: name.into(), ctx: ast::ExprContext::Store, range: (location..end_location).into() },
)
}

Expand Down