Skip to content

Commit

Permalink
fix more in-place dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Sep 28, 2023
1 parent ed8a058 commit 8a74b78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vyper/compiler/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def build_metadata_output(compiler_data: CompilerData) -> dict:
sigs = compiler_data.function_signatures

def _var_rec_dict(variable_record):
ret = vars(variable_record)
ret = vars(variable_record).copy()
ret["typ"] = str(ret["typ"])
if ret["data_offset"] is None:
del ret["data_offset"]
Expand All @@ -133,7 +133,7 @@ def _to_dict(func_t):
args = ret[attr]
ret[attr] = {arg.name: str(arg.typ) for arg in args}

ret["frame_info"] = vars(func_t._ir_info.frame_info)
ret["frame_info"] = vars(func_t._ir_info.frame_info).copy()
del ret["frame_info"]["frame_vars"] # frame_var.pos might be IR, cannot serialize

keep_keys = {
Expand Down

0 comments on commit 8a74b78

Please sign in to comment.