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

Commit 7ec979d

Browse files
authored
Fix TypeAliasName to store name instead of load (#42)
Copies the fix in RustPython#99
1 parent fab9cc5 commit 7ec979d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ruff_python_parser/src/python.lalrpop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ FuncDef: ast::Stmt = {
10291029

10301030
TypeAliasName: ast::Expr = {
10311031
<location:@L> <name:Identifier> <end_location:@R> => ast::Expr::Name(
1032-
ast::ExprName { id: name.into(), ctx: ast::ExprContext::Load, range: (location..end_location).into() },
1032+
ast::ExprName { id: name.into(), ctx: ast::ExprContext::Store, range: (location..end_location).into() },
10331033
),
10341034
}
10351035

ruff_python_parser/src/python.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// auto-generated: "lalrpop 0.20.0"
2-
// sha3: bfe8038efa3e290b9841ea2f84a2278ded65476a00892aa448e9708655ccb86d
2+
// sha3: 9c49dc85355275f274dcc32e163c443c0dc567214c9725547e2218e9acd22577
33
use num_bigint::BigInt;
44
use ruff_text_size::TextSize;
55
use ruff_python_ast::{self as ast, Ranged, MagicKind};
@@ -33544,7 +33544,7 @@ fn __action163<
3354433544
) -> ast::Expr
3354533545
{
3354633546
ast::Expr::Name(
33547-
ast::ExprName { id: name.into(), ctx: ast::ExprContext::Load, range: (location..end_location).into() },
33547+
ast::ExprName { id: name.into(), ctx: ast::ExprContext::Store, range: (location..end_location).into() },
3354833548
)
3354933549
}
3355033550

0 commit comments

Comments
 (0)