Skip to content

Commit

Permalink
Update gen_decl.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Jun 18, 2024
1 parent 206c020 commit db2cf85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/py2erg/gen_decl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl DeclFileGenerator {
.ident()
.inspect()
.replace('\0', "")
.replace('%', "___");
.replace(['%', '*'], "___");
let ref_t = def.sig.ident().ref_t();
let typ = escape_type(ref_t.replace_failure().to_string_unabbreviated());
// Erg can automatically import nested modules
Expand Down Expand Up @@ -103,7 +103,7 @@ impl DeclFileGenerator {
.ident()
.inspect()
.replace('\0', "")
.replace('%', "___");
.replace(['%', '*'], "___");
let src = format!("{}.{class_name}", self.namespace);
let stash = std::mem::replace(&mut self.namespace, src);
let decl = format!(".{class_name}: ClassType");
Expand Down

0 comments on commit db2cf85

Please sign in to comment.