From d1eee22723c3602ca12bc84fec41ed8e3a899c67 Mon Sep 17 00:00:00 2001 From: Josselin Date: Thu, 17 Dec 2020 10:59:09 +0100 Subject: [PATCH] Add __eq__ to SolidityImportPlaceHolder --- slither/core/declarations/solidity_variables.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/slither/core/declarations/solidity_variables.py b/slither/core/declarations/solidity_variables.py index 28e414699..559850ee3 100644 --- a/slither/core/declarations/solidity_variables.py +++ b/slither/core/declarations/solidity_variables.py @@ -204,6 +204,13 @@ class SolidityImportPlaceHolder(SolidityVariable): def type(self) -> ElementaryType: return ElementaryType("string") + def __eq__(self, other): + return ( + self.__class__ == other.__class__ + and self.name == other.name + and self._import_directive.filename == self._import_directive.filename + ) + @property def import_directive(self) -> "Import": return self._import_directive