From 0844e73fa129c317e77d451b2e4039e87ddd8e17 Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Mon, 5 Nov 2018 19:37:02 +0530 Subject: [PATCH] fix files for black --- mythril/laser/ethereum/state.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mythril/laser/ethereum/state.py b/mythril/laser/ethereum/state.py index c2554531..112315ea 100644 --- a/mythril/laser/ethereum/state.py +++ b/mythril/laser/ethereum/state.py @@ -265,6 +265,7 @@ class Constraints(list): as a simple list of constraints with some background processing. TODO: add the solver to this class after callback refactor """ + def __init__(self, constraint_list=None, solver=None, possibility=None): super(Constraints, self).__init__(constraint_list or []) self.solver = solver @@ -356,6 +357,7 @@ class MachineState: """ MachineState represents current machine state also referenced to as \mu """ + def __init__(self, gas, pc=0, stack=None, memory=None, constraints=None, depth=0): """ Constructor for machineState """ self.pc = pc @@ -391,8 +393,14 @@ class MachineState: return values[0] if amount == 1 else values def __deepcopy__(self, memodict={}): - return MachineState(gas=self.gas, pc=self.pc, stack=copy(self.stack), memory=copy(self.memory), - constraints=copy(self.constraints), depth=self.depth) + return MachineState( + gas=self.gas, + pc=self.pc, + stack=copy(self.stack), + memory=copy(self.memory), + constraints=copy(self.constraints), + depth=self.depth, + ) def __str__(self): return str(self.as_dict)