Fix type errors

pull/1220/head
Nikhil 5 years ago
parent 375d738f3a
commit 9d9da324be
  1. 2
      mythril/laser/ethereum/keccak_function_manager.py
  2. 2
      mythril/laser/ethereum/state/constraints.py
  3. 2
      mythril/laser/smt/__init__.py
  4. 2
      mythril/laser/smt/function.py

@ -100,7 +100,7 @@ class KeccakFunctionManager:
URem(func(data), symbol_factory.BitVecVal(64, 256)) == 0,
)
f_cond = copy(condition)
flag_condition = False
flag_condition = symbol_factory.Bool(False)
total_keys = global_state.total_topo_keys
for val in self.size_values[length]:
if hash(simplify(func(data))) != hash(simplify(val)) and val in total_keys:

@ -30,7 +30,7 @@ class Constraints(list):
super(Constraints, self).__init__(constraint_list)
self._default_timeout = 100
self._is_possible = is_possible
self.weighted = []
self.weighted = [] # type: List[Bool]
@property
def is_possible(self) -> bool:

@ -138,7 +138,7 @@ class _SmtSymbolFactory(SymbolFactory[SMTBool, BitVec]):
return SMTBool(raw, annotations)
@staticmethod
def BoolSym(name: str, annotations: Annotations = None) -> T:
def BoolSym(name: str, annotations: Annotations = None) -> SMTBool:
"""
Creates a Bool with concrete value
:param name: The name of the Bool variable

@ -22,4 +22,4 @@ class Function:
"""Function accessor, item can be symbolic."""
return BitVec(
cast(z3.BitVecRef, self.raw(item.raw)), annotations=item.annotations
) # type: ignore
)

Loading…
Cancel
Save