From 058e4b97d68a46d669a421bbcda3461bbdb8de6f Mon Sep 17 00:00:00 2001 From: Shunsuke Shibayama Date: Thu, 5 Oct 2023 02:02:28 +0900 Subject: [PATCH] Update convert.rs --- crates/py2erg/convert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/py2erg/convert.rs b/crates/py2erg/convert.rs index af87eb0..4478624 100644 --- a/crates/py2erg/convert.rs +++ b/crates/py2erg/convert.rs @@ -1054,7 +1054,7 @@ impl ASTConverter { .keywords .into_iter() .map(|Keyword { arg, value, range }| { - let name = arg.unwrap(); + let name = arg.unwrap_or(rustpython_ast::Identifier::new("_")); let name = Token::symbol_with_loc(name.to_string(), pyloc_to_ergloc(range)); let ex = self.convert_expr(value); KwArg::new(name, None, ex)