Skip to content

Commit

Permalink
Add functools.wraps decorator to TAC handler
Browse files Browse the repository at this point in the history
  • Loading branch information
robmcl4 committed Nov 4, 2023
1 parent 659b5d5 commit 77c19dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions greed/TAC/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
import logging
from typing import List, Mapping, Callable

Expand Down Expand Up @@ -118,6 +119,7 @@ def handler_without_side_effects(func: Callable[["TAC_Statement", SymbolicEVMSta
(can just read and return statically computed results).
"""

@functools.wraps(func)
def wrap(self, state: SymbolicEVMState):
self.set_arg_val(state)
state.trace.append(state.curr_stmt)
Expand Down Expand Up @@ -150,6 +152,7 @@ def handler_with_side_effects(func: Callable[["TAC_Statement", SymbolicEVMState]
(can't just read and return statically computed results).
"""

@functools.wraps(func)
def wrap(self, state: SymbolicEVMState):
self.set_arg_val(state)
state.trace.append(state.curr_stmt)
Expand Down

0 comments on commit 77c19dc

Please sign in to comment.