Fix import issues (pycharm went wild?)

pull/411/head
Josselin 5 years ago
parent e3d3151787
commit e56473879c
  1. 2
      slither/slithir/operations/balance.py
  2. 6
      slither/slithir/operations/binary.py
  3. 4
      slither/slithir/operations/call.py
  4. 3
      slither/slithir/operations/condition.py
  5. 2
      slither/slithir/operations/init_array.py
  6. 1
      slither/slithir/operations/length.py
  7. 2
      slither/slithir/operations/library_call.py
  8. 1
      slither/slithir/operations/member.py
  9. 7
      slither/slithir/operations/new_elementary_type.py
  10. 6
      slither/slithir/operations/send.py
  11. 1
      slither/slithir/operations/type_conversion.py

@ -1,4 +1,4 @@
from slither.slithir.operations.lvalue import OperationWithLValue
from slither.core.solidity_types import ElementaryType
from slither.slithir.operations.lvalue import OperationWithLValue
from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue

@ -1,10 +1,10 @@
import logging
from slither.core.solidity_types import ElementaryType
from slither.slithir.exceptions import SlithIRError
from slither.slithir.operations.lvalue import OperationWithLValue
from slither.core.variables.variable import Variable
from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue
from slither.core.solidity_types import ElementaryType
from slither.slithir.variables import ReferenceVariable
from slither.slithir.exceptions import SlithIRError
logger = logging.getLogger("BinaryOperationIR")

@ -1,6 +1,6 @@
from slither.slithir.operations.operation import Operation
class Call(Operation):
def __init__(self):
@ -27,4 +27,4 @@ class Call(Operation):
Must be called after slithIR analysis pass
:return: bool
'''
return False
return False

@ -1,11 +1,14 @@
from slither.slithir.operations.operation import Operation
from slither.slithir.utils.utils import is_valid_rvalue
class Condition(Operation):
"""
Condition
Only present as last operation in conditional node
"""
def __init__(self, value):
assert is_valid_rvalue(value)
super(Condition, self).__init__()

@ -7,6 +7,8 @@ class InitArray(OperationWithLValue):
def __init__(self, init_values, lvalue):
# init_values can be an array of n dimension
# reduce was removed in py3
super().__init__()
def reduce(xs):
result = True
for i in xs:

@ -1,3 +1,4 @@
from slither.core.solidity_types import ElementaryType
from slither.slithir.operations.lvalue import OperationWithLValue
from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue

@ -9,7 +9,7 @@ class LibraryCall(HighLevelCall):
# Development function, to be removed once the code is stable
def _check_destination(self, destination):
assert isinstance(destination, (Contract))
assert isinstance(destination, Contract)
def can_reenter(self, callstack=None):
'''

@ -1,3 +1,4 @@
from slither.core.declarations import Contract
from slither.core.declarations.enum import Enum
from slither.slithir.operations.lvalue import OperationWithLValue
from slither.slithir.utils.utils import is_valid_rvalue

@ -1,8 +1,7 @@
from slither.slithir.operations.lvalue import OperationWithLValue
from slither.slithir.operations.call import Call
from slither.core.solidity_types.elementary_type import ElementaryType
from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue
from slither.slithir.operations.call import Call
from slither.slithir.operations.lvalue import OperationWithLValue
from slither.slithir.utils.utils import is_valid_lvalue
class NewElementaryType(Call, OperationWithLValue):

@ -31,9 +31,7 @@ class Send(Call, OperationWithLValue):
def destination(self):
return self._destination
def __str__(self):
value = 'value:{}'.format(self.call_value)
return str(self.lvalue) +' = SEND dest:{} {}'.format(self.destination, value)
#
return str(self.lvalue) + ' = SEND dest:{} {}'.format(self.destination, value)
#

@ -6,6 +6,7 @@ from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue
class TypeConversion(OperationWithLValue):
def __init__(self, result, variable, variable_type):
super().__init__()
assert is_valid_rvalue(variable)
assert is_valid_lvalue(result)
assert isinstance(variable_type, Type)

Loading…
Cancel
Save