fix files for black

pull/534/head
Nikhil Parasaram 6 years ago
parent 2f2375eb87
commit 0844e73fa1
  1. 12
      mythril/laser/ethereum/state.py

@ -265,6 +265,7 @@ class Constraints(list):
as a simple list of constraints with some background processing. as a simple list of constraints with some background processing.
TODO: add the solver to this class after callback refactor TODO: add the solver to this class after callback refactor
""" """
def __init__(self, constraint_list=None, solver=None, possibility=None): def __init__(self, constraint_list=None, solver=None, possibility=None):
super(Constraints, self).__init__(constraint_list or []) super(Constraints, self).__init__(constraint_list or [])
self.solver = solver self.solver = solver
@ -356,6 +357,7 @@ class MachineState:
""" """
MachineState represents current machine state also referenced to as \mu MachineState represents current machine state also referenced to as \mu
""" """
def __init__(self, gas, pc=0, stack=None, memory=None, constraints=None, depth=0): def __init__(self, gas, pc=0, stack=None, memory=None, constraints=None, depth=0):
""" Constructor for machineState """ """ Constructor for machineState """
self.pc = pc self.pc = pc
@ -391,8 +393,14 @@ class MachineState:
return values[0] if amount == 1 else values return values[0] if amount == 1 else values
def __deepcopy__(self, memodict={}): def __deepcopy__(self, memodict={}):
return MachineState(gas=self.gas, pc=self.pc, stack=copy(self.stack), memory=copy(self.memory), return MachineState(
constraints=copy(self.constraints), depth=self.depth) gas=self.gas,
pc=self.pc,
stack=copy(self.stack),
memory=copy(self.memory),
constraints=copy(self.constraints),
depth=self.depth,
)
def __str__(self): def __str__(self):
return str(self.as_dict) return str(self.as_dict)

Loading…
Cancel
Save