Add type hints

pull/1120/head
Nikhil Parasaram 6 years ago
parent 85f11e240b
commit e490802f3f
  1. 4
      mythril/laser/smt/bool.py

@ -86,7 +86,7 @@ class Bool(Expression[z3.BoolRef]):
def And(*args: Union[Bool, bool]) -> Bool: def And(*args: Union[Bool, bool]) -> Bool:
"""Create an And expression.""" """Create an And expression."""
union = [] union = [] # type: List
args_list = [arg if isinstance(arg, Bool) else Bool(arg) for arg in args] args_list = [arg if isinstance(arg, Bool) else Bool(arg) for arg in args]
for arg in args_list: for arg in args_list:
union += arg.annotations union += arg.annotations
@ -108,7 +108,7 @@ def Or(*args: Union[Bool, bool]) -> Bool:
:return: :return:
""" """
args_list = [arg if isinstance(arg, Bool) else Bool(arg) for arg in args] args_list = [arg if isinstance(arg, Bool) else Bool(arg) for arg in args]
union = [] union = [] # type: List
for arg in args_list: for arg in args_list:
union += arg.annotations union += arg.annotations
return Bool(z3.Or([a.raw for a in args_list]), annotations=union) return Bool(z3.Or([a.raw for a in args_list]), annotations=union)

Loading…
Cancel
Save