mirror of
https://github.com/mtshiba/pylyzer.git
synced 2025-07-24 08:43:43 +00:00
fix: tuple/import bugs
This commit is contained in:
parent
c7b2b8cf55
commit
802eb4fca5
4 changed files with 21 additions and 17 deletions
|
@ -462,9 +462,9 @@ impl ASTConverter {
|
|||
Self::param_pattern_to_var(param.pat),
|
||||
param.t_spec.map(|t| t.t_spec),
|
||||
));
|
||||
let method = tmp_expr.clone().attr_expr(
|
||||
self.convert_ident("__Tuple_getitem__".to_string(), expr.location),
|
||||
);
|
||||
let method = tmp_expr
|
||||
.clone()
|
||||
.attr_expr(self.convert_ident("__getitem__".to_string(), expr.location));
|
||||
let args =
|
||||
Args::new(vec![PosArg::new(Expr::Literal(index))], None, vec![], None);
|
||||
let tuple_acc = method.call_expr(args);
|
||||
|
@ -1391,11 +1391,9 @@ impl ASTConverter {
|
|||
Self::param_pattern_to_var(param.pat),
|
||||
param.t_spec.map(|t| t.t_spec),
|
||||
));
|
||||
let method =
|
||||
tmp_expr.clone().attr_expr(self.convert_ident(
|
||||
"__Tuple_getitem__".to_string(),
|
||||
stmt.location,
|
||||
));
|
||||
let method = tmp_expr.clone().attr_expr(
|
||||
self.convert_ident("__getitem__".to_string(), stmt.location),
|
||||
);
|
||||
let args =
|
||||
Args::pos_only(vec![PosArg::new(Expr::Literal(index))], None);
|
||||
let tuple_acc = method.call_expr(args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue