Skip to content

Commit

Permalink
add write file
Browse files Browse the repository at this point in the history
  • Loading branch information
youkaichao committed Nov 29, 2023
1 parent aa03288 commit 8800a13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions depyf/explain/enable_debugging.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def __call__(self, code, new_code):
else:
func_name = filename.split(os.path.sep)[-1].split(".")[0]
src = f"def {func_name}" + src_body
with open(filename, "w") as f:
f.write(src)
break

transformed_code = compile(src, filename=filename, mode="exec")
Expand Down

0 comments on commit 8800a13

Please sign in to comment.