diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/highlevelil.py | 10 | ||||
| -rw-r--r-- | python/lowlevelil.py | 24 | ||||
| -rw-r--r-- | python/mediumlevelil.py | 20 |
3 files changed, 27 insertions, 27 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py index 05de45de..53678cce 100644 --- a/python/highlevelil.py +++ b/python/highlevelil.py @@ -298,27 +298,27 @@ class HighLevelILInstruction: return f"<{self.operation.name}: {first_line}{continuation}>" def __eq__(self, other:'HighLevelILInstruction'): - if not isinstance(other, self.__class__): + if not isinstance(other, HighLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index == other.expr_index def __lt__(self, other:'HighLevelILInstruction'): - if not isinstance(other, self.__class__): + if not isinstance(other, HighLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index < other.expr_index def __le__(self, other:'HighLevelILInstruction'): - if not isinstance(other, self.__class__): + if not isinstance(other, HighLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index <= other.expr_index def __gt__(self, other:'HighLevelILInstruction'): - if not isinstance(other, self.__class__): + if not isinstance(other, HighLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index > other.expr_index def __ge__(self, other:'HighLevelILInstruction'): - if not isinstance(other, self.__class__): + if not isinstance(other, HighLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index >= other.expr_index diff --git a/python/lowlevelil.py b/python/lowlevelil.py index dc983362..dd49f10a 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -466,33 +466,33 @@ class LowLevelILInstruction: def __repr__(self): return "<il: %s>" % str(self) - def __eq__(self, other): - if not isinstance(other, self.__class__): + def __eq__(self, other:'LowLevelILInstruction') -> bool: + if not isinstance(other, LowLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index == other.expr_index - def __ne__(self, other): - if not isinstance(other, self.__class__): + def __ne__(self, other:'LowLevelILInstruction') -> bool: + if not isinstance(other, LowLevelILInstruction): return NotImplemented return not (self == other) - def __lt__(self, other): - if not isinstance(other, self.__class__): + def __lt__(self, other:'LowLevelILInstruction') -> bool: + if not isinstance(other, LowLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index < other.expr_index - def __le__(self, other): - if not isinstance(other, self.__class__): + def __le__(self, other:'LowLevelILInstruction') -> bool: + if not isinstance(other, LowLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index <= other.expr_index - def __gt__(self, other): - if not isinstance(other, self.__class__): + def __gt__(self, other:'LowLevelILInstruction') -> bool: + if not isinstance(other, LowLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index > other.expr_index - def __ge__(self, other): - if not isinstance(other, self.__class__): + def __ge__(self, other:'LowLevelILInstruction') -> bool: + if not isinstance(other, LowLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index >= other.expr_index diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index 8941b3d4..61fb5279 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -273,28 +273,28 @@ class MediumLevelILInstruction: def __repr__(self): return "<il: %s>" % str(self) - def __eq__(self, other:'MediumLevelILInstruction'): - if not isinstance(other, self.__class__): + def __eq__(self, other:'MediumLevelILInstruction') -> bool: + if not isinstance(other, MediumLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index == other.expr_index - def __lt__(self, other:'MediumLevelILInstruction'): - if not isinstance(other, self.__class__): + def __lt__(self, other:'MediumLevelILInstruction') -> bool: + if not isinstance(other, MediumLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index < other.expr_index - def __le__(self, other:'MediumLevelILInstruction'): - if not isinstance(other, self.__class__): + def __le__(self, other:'MediumLevelILInstruction') -> bool: + if not isinstance(other, MediumLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index <= other.expr_index - def __gt__(self, other:'MediumLevelILInstruction'): - if not isinstance(other, self.__class__): + def __gt__(self, other:'MediumLevelILInstruction') -> bool: + if not isinstance(other, MediumLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index > other.expr_index - def __ge__(self, other:'MediumLevelILInstruction'): - if not isinstance(other, self.__class__): + def __ge__(self, other:'MediumLevelILInstruction') -> bool: + if not isinstance(other, MediumLevelILInstruction): return NotImplemented return self.function == other.function and self.expr_index >= other.expr_index |
